diff options
author | Theodore Tso <tytso@mit.edu> | 1998-05-06 20:24:10 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1998-05-06 20:24:10 +0000 |
commit | df85cc01656c2a234642047ea22b44b5f6a65683 (patch) | |
tree | c8eb10be62668ae2cde30336430d8145a3d30df3 /src/appl/simple | |
parent | 376a54c9f64fbb57813e5902bd46ed63e9b2c746 (diff) | |
download | krb5-df85cc01656c2a234642047ea22b44b5f6a65683.zip krb5-df85cc01656c2a234642047ea22b44b5f6a65683.tar.gz krb5-df85cc01656c2a234642047ea22b44b5f6a65683.tar.bz2 |
POSIX states that getopt returns -1 when it is done parsing options,
not EOF.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10550 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/simple')
-rw-r--r-- | src/appl/simple/client/ChangeLog | 5 | ||||
-rw-r--r-- | src/appl/simple/client/sim_client.c | 2 | ||||
-rw-r--r-- | src/appl/simple/server/ChangeLog | 5 | ||||
-rw-r--r-- | src/appl/simple/server/sim_server.c | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/appl/simple/client/ChangeLog b/src/appl/simple/client/ChangeLog index 04d4e43..3065caa 100644 --- a/src/appl/simple/client/ChangeLog +++ b/src/appl/simple/client/ChangeLog @@ -1,3 +1,8 @@ +1998-05-06 Theodore Ts'o <tytso@rsts-11.mit.edu> + + * sim_client.c (main): POSIX states that getopt returns -1 when it + is done parsing options, not EOF. + Wed Feb 18 15:34:52 1998 Tom Yu <tlyu@mit.edu> * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index ec88a76..0838757 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -108,7 +108,7 @@ main(argc, argv) * */ opterr = 0; - while ((ch = getopt(argc, argv, "p:m:h:s:")) != EOF) + while ((ch = getopt(argc, argv, "p:m:h:s:")) != -1) switch (ch) { case 'p': port = atoi(optarg); diff --git a/src/appl/simple/server/ChangeLog b/src/appl/simple/server/ChangeLog index 3381a5b..68e9d4b 100644 --- a/src/appl/simple/server/ChangeLog +++ b/src/appl/simple/server/ChangeLog @@ -1,3 +1,8 @@ +1998-05-06 Theodore Ts'o <tytso@rsts-11.mit.edu> + + * sim_server.c (argv): POSIX states that getopt returns -1 when it + is done parsing options, not EOF. + Wed Feb 18 15:35:38 1998 Tom Yu <tlyu@mit.edu> * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c index f57ec89..7f1a824 100644 --- a/src/appl/simple/server/sim_server.c +++ b/src/appl/simple/server/sim_server.c @@ -98,7 +98,7 @@ char *argv[]; * */ opterr = 0; - while ((ch = getopt(argc, argv, "p:s:S:")) != EOF) + while ((ch = getopt(argc, argv, "p:s:S:")) != -1) switch (ch) { case 'p': port = atoi(optarg); |