From 10a3fb38d317752688e0dfe8729939908b99a87c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 6 May 1998 20:01:28 +0000 Subject: [PATCH] POSIX states that getopt returns -1 when it is done parsing options, not EOF. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10548 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/ChangeLog | 5 +++++ src/appl/gssftp/ftp/radix.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 08c18dc5b..2bad1481d 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,8 @@ +1998-05-06 Theodore Ts'o + + * 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 * cmds.c (setpeer): Fix so that autologin is respected again diff --git a/src/appl/gssftp/ftp/radix.c b/src/appl/gssftp/ftp/radix.c index c651ef576..bba641f40 100644 --- a/src/appl/gssftp/ftp/radix.c +++ b/src/appl/gssftp/ftp/radix.c @@ -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]); -- 2.26.2