From 167db5291223948e17d74470feff53f15777fcaf Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 29 Mar 1997 03:33:12 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- sbin/i386/mount_msdos/mount_msdos.c | 4 ++-- sbin/i386/nextboot/nextboot.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/i386') diff --git a/sbin/i386/mount_msdos/mount_msdos.c b/sbin/i386/mount_msdos/mount_msdos.c index dff366b..53ae83b 100644 --- a/sbin/i386/mount_msdos/mount_msdos.c +++ b/sbin/i386/mount_msdos/mount_msdos.c @@ -30,7 +30,7 @@ #ifndef lint static const char rcsid[] = - "$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $"; + "$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $"; #endif /* not lint */ #include @@ -75,7 +75,7 @@ main(argc, argv) mntflags = set_gid = set_uid = set_mask = 0; (void)memset(&args, '\0', sizeof(args)); - while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) { + while ((c = getopt(argc, argv, "u:g:m:o:")) != -1) { switch (c) { case 'u': args.uid = a_uid(optarg); diff --git a/sbin/i386/nextboot/nextboot.c b/sbin/i386/nextboot/nextboot.c index 2398b56..5461884 100644 --- a/sbin/i386/nextboot/nextboot.c +++ b/sbin/i386/nextboot/nextboot.c @@ -66,7 +66,7 @@ main (int argc, char** argv) int part; bflag = 0; - while ((ch = getopt(argc, argv, "bde")) != EOF) { + while ((ch = getopt(argc, argv, "bde")) != -1) { switch(ch) { case 'b': bflag = 1; -- cgit v1.1