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

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

src/kadmin/v4server/ChangeLog
src/kadmin/v4server/admin_server.c

index d64d0850a92dcb00abd671a1bdc3b5a0f169a54a..d4c952cc407edb860744efee462119e1c00745df 100644 (file)
@@ -1,3 +1,8 @@
+1998-05-06  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * admin_server.c (argv): POSIX states that getopt returns -1
+               when it is done parsing options, not EOF.
+
 Fri Feb 27 23:32:38 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Makefile.in: Changed thisconfigdir to point at the kadmin
index 8dc97b90c6e773602c12d3fad656c1f1de1921fb..9cd2f8fb51e650864103859e0a2825f7cd9eb84f 100644 (file)
@@ -117,7 +117,7 @@ char *argv[];
     memset(krbrlm, 0, sizeof(krbrlm));
 
     fascist_cpw = 1;           /* by default, enable fascist mode */
-    while ((c = getopt(argc, argv, "Df:hnd:a:r:FNk:")) != EOF)
+    while ((c = getopt(argc, argv, "Df:hnd:a:r:FNk:")) != -1)
        switch(c) {
        case 'D':
            debug++;