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 /sbin/swapon/swapon.c | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'sbin/swapon/swapon.c')
-rw-r--r-- | sbin/swapon/swapon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 1513c8e2352..d8e6a936cd7 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: swapon.c,v 1.2 1996/06/23 14:32:46 deraadt Exp $ */ +/* $OpenBSD: swapon.c,v 1.3 1997/01/15 23:41:43 millert Exp $ */ /* $NetBSD: swapon.c,v 1.7 1995/03/18 15:01:18 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)swapon.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: swapon.c,v 1.2 1996/06/23 14:32:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: swapon.c,v 1.3 1997/01/15 23:41:43 millert Exp $"; #endif #endif /* not lint */ @@ -67,7 +67,7 @@ main(argc, argv) int ch, doall; doall = 0; - while ((ch = getopt(argc, argv, "a")) != EOF) + while ((ch = getopt(argc, argv, "a")) != -1) switch((char)ch) { case 'a': doall = 1; |