POSIX states that getopt returns -1 when it is done parsing options,
authorTheodore Tso <tytso@mit.edu>
Wed, 6 May 1998 20:01:28 +0000 (20:01 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 6 May 1998 20:01:28 +0000 (20:01 +0000)
not EOF.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10548 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftp/ChangeLog
src/appl/gssftp/ftp/radix.c

index 08c18dc5bf9e37632563001cde895ea12266363c..2bad1481dbba5d2a6094a5bdb32aa86989ab3e60 100644 (file)
@@ -1,3 +1,8 @@
+1998-05-06  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * radix.c (argv): POSIX states that getopt returns -1 when it
+               is done parsing options, not EOF.
+
 Sat Apr 25 01:53:04 1998  Sam Hartman  <hartmans@luminous.mit.edu>
 
        * cmds.c (setpeer): Fix so that autologin is respected again
index c651ef5763973f8c64f3a932a84cd09faffd7e1c..bba641f4057e8f23ed97528942950f5a72926928 100644 (file)
@@ -120,7 +120,7 @@ char *argv[];
        int c, len = 0, decode = 0;
        extern int optind;
 
-       while ((c = getopt(argc, argv, "d")) != EOF)
+       while ((c = getopt(argc, argv, "d")) != -1)
                switch(c) {
                        default:
                                usage(argv[0]);