From 552d265b6ced1e56d31f20f16a7fe9ae818d568b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 15 Jan 1997 23:44:39 +0000 Subject: getopt(3) returns -1 when out of args, not EOF, whee! --- sbin/mount/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/mount/mount.c') diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 1efd465ef66..5f1465322fa 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.c,v 1.12 1996/12/23 08:38:49 downsj Exp $ */ +/* $OpenBSD: mount.c,v 1.13 1997/01/15 23:41:15 millert Exp $ */ /* $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount.c 8.19 (Berkeley) 4/19/94"; #else -static char rcsid[] = "$OpenBSD: mount.c,v 1.12 1996/12/23 08:38:49 downsj Exp $"; +static char rcsid[] = "$OpenBSD: mount.c,v 1.13 1997/01/15 23:41:15 millert Exp $"; #endif #endif /* not lint */ @@ -120,7 +120,7 @@ main(argc, argv) all = forceall = init_flags = 0; options = NULL; vfstype = "ffs"; - while ((ch = getopt(argc, argv, "Aadfo:rwt:uv")) != EOF) + while ((ch = getopt(argc, argv, "Aadfo:rwt:uv")) != -1) switch (ch) { case 'A': all = forceall = 1; -- cgit v1.2.3