diff options
author | imp <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
commit | 691010efad5c05f7ee86a870abce217fe8e9b8d1 (patch) | |
tree | b28e04577780319990238a98e7549582e44d9d51 /usr.sbin/lpr | |
parent | 3d7b78ed8c2fd06816b04ddcb57d58281409aa62 (diff) | |
download | FreeBSD-src-691010efad5c05f7ee86a870abce217fe8e9b8d1.zip FreeBSD-src-691010efad5c05f7ee86a870abce217fe8e9b8d1.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/lpq/lpq.c | 2 | ||||
-rw-r--r-- | usr.sbin/lpr/lpr/lpr.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpq/lpq.c b/usr.sbin/lpr/lpq/lpq.c index 7d1b520..0e3ec33 100644 --- a/usr.sbin/lpr/lpq/lpq.c +++ b/usr.sbin/lpr/lpq/lpq.c @@ -90,7 +90,7 @@ main(argc, argv) openlog("lpd", 0, LOG_LPR); aflag = lflag = 0; - while ((ch = getopt(argc, argv, "alP:")) != EOF) + while ((ch = getopt(argc, argv, "alP:")) != -1) switch((char)ch) { case 'a': ++aflag; diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c index 0ba3725..a729c0d 100644 --- a/usr.sbin/lpr/lpr/lpr.c +++ b/usr.sbin/lpr/lpr/lpr.c @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)lpr.c 8.4 (Berkeley) 4/28/95" - "\n$Id: lpr.c,v 1.12 1997/02/22 16:06:20 peter Exp $\n"; + "\n$Id: lpr.c,v 1.13 1997/02/26 02:22:45 mpp Exp $\n"; #endif /* not lint */ /* @@ -140,7 +140,7 @@ main(argc, argv) errs = 0; while ((c = getopt(argc, argv, - ":#:1:2:3:4:C:J:P:T:U:cdfghi:lnmprstvw:")) != EOF) + ":#:1:2:3:4:C:J:P:T:U:cdfghi:lnmprstvw:")) != -1) switch (c) { case '#': /* n copies */ i = atoi(optarg); |