diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
commit | 552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch) | |
tree | 219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /usr.bin/id | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'usr.bin/id')
-rw-r--r-- | usr.bin/id/id.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c index 4696ef799c7..1586254719e 100644 --- a/usr.bin/id/id.c +++ b/usr.bin/id/id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: id.c,v 1.2 1996/06/26 05:34:24 deraadt Exp $ */ +/* $OpenBSD: id.c,v 1.3 1997/01/15 23:42:35 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)id.c 8.3 (Berkeley) 4/28/95";*/ -static char rcsid[] = "$OpenBSD: id.c,v 1.2 1996/06/26 05:34:24 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: id.c,v 1.3 1997/01/15 23:42:35 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -73,7 +73,7 @@ main(argc, argv) int Gflag, ch, gflag, id, nflag, pflag, rflag, uflag; Gflag = gflag = nflag = pflag = rflag = uflag = 0; - while ((ch = getopt(argc, argv, "Ggnpru")) != EOF) + while ((ch = getopt(argc, argv, "Ggnpru")) != -1) switch(ch) { case 'G': Gflag = 1; |