From 167db5291223948e17d74470feff53f15777fcaf Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 29 Mar 1997 03:33:12 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- sbin/routed/main.c | 2 +- sbin/routed/rtquery/rtquery.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/routed') diff --git a/sbin/routed/main.c b/sbin/routed/main.c index 36399e9..327ffdf 100644 --- a/sbin/routed/main.c +++ b/sbin/routed/main.c @@ -123,7 +123,7 @@ main(int argc, (void)gethostname(myname, sizeof(myname)-1); (void)gethost(myname, &myaddr); - while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != EOF) { + while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != -1) { switch (n) { case 's': supplier = 1; diff --git a/sbin/routed/rtquery/rtquery.c b/sbin/routed/rtquery/rtquery.c index bddf590..18c1b1a 100644 --- a/sbin/routed/rtquery/rtquery.c +++ b/sbin/routed/rtquery/rtquery.c @@ -118,7 +118,7 @@ main(int argc, OMSG.rip_nets[0].n_metric = htonl(HOPCNT_INFINITY); pgmname = argv[0]; - while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != EOF) + while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != -1) switch (ch) { case 'n': not_trace = 1; -- cgit v1.1