From 6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 31 Mar 1997 05:11:47 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- usr.sbin/chroot/chroot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/chroot') diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index 81bf675125a7..db60a34835d9 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -61,7 +61,7 @@ main(argc, argv) int ch; char *shell; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: -- cgit v1.3