- more char c = getopt(...) idiocy

- getopt returns -1, not EOF
This commit is contained in:
pvalchev 2002-02-23 23:07:55 +00:00
parent a6aa2cf656
commit 229092ad8b

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_ldistfp_c,v 1.1.1.1 2001/08/12 20:01:44 naddy Exp $
--- src/ldistfp.c.orig Tue Jul 31 14:31:54 2001
+++ src/ldistfp.c Tue Jul 31 14:34:16 2001
$OpenBSD: patch-src_ldistfp_c,v 1.2 2002/02/23 23:07:55 pvalchev Exp $
--- src/ldistfp.c.orig Sun May 27 05:40:35 2001
+++ src/ldistfp.c Sat Feb 23 16:01:58 2002
@@ -24,7 +24,7 @@ typedef struct fingerprint {
} fingerprint;
@ -10,3 +10,21 @@ $OpenBSD: patch-src_ldistfp_c,v 1.1.1.1 2001/08/12 20:01:44 naddy Exp $
char * fp_url = FP_URL;
int fp_count = 0;
@@ -62,7 +62,7 @@ main (int argc, char *argv[])
n;
int rawmode = 0;
int update_only = 0;
- char c;
+ int c;
char * rbuf;
char * target;
@@ -72,7 +72,7 @@ main (int argc, char *argv[])
if (argc < 2)
usage (argv[0]);
- while ((c = getopt (argc, argv, "rn:smf:uU:")) != EOF) {
+ while ((c = getopt (argc, argv, "rn:smf:uU:")) != -1) {
switch (c) {
case 'r':
rawmode = 1;