Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/find Compare the return value of getopt(3) against -...



details:   https://anonhg.NetBSD.org/src/rev/1d10d1f338b1
branches:  trunk
changeset: 483733:1d10d1f338b1
user:      enami <enami%NetBSD.org@localhost>
date:      Thu Mar 16 18:47:48 2000 +0000

description:
Compare the return value of getopt(3) against -1 rather than EOF.
(while i'm here, one more cosometic change is performed).

diffstat:

 usr.bin/find/main.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r a66ef3c32070 -r 1d10d1f338b1 usr.bin/find/main.c
--- a/usr.bin/find/main.c       Thu Mar 16 18:44:29 2000 +0000
+++ b/usr.bin/find/main.c       Thu Mar 16 18:47:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.15 2000/03/16 18:44:30 enami Exp $  */
+/*     $NetBSD: main.c,v 1.16 2000/03/16 18:47:48 enami Exp $  */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -43,7 +43,7 @@
 #else
 __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
        The Regents of the University of California.  All rights reserved.\n");
-__RCSID("$NetBSD: main.c,v 1.15 2000/03/16 18:44:30 enami Exp $");
+__RCSID("$NetBSD: main.c,v 1.16 2000/03/16 18:47:48 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -89,8 +89,8 @@
        p = start = alloca(argc * sizeof (char *));
 
        ftsoptions = FTS_NOSTAT | FTS_PHYSICAL;
-       while ((ch = getopt(argc, argv, "HLPXdf:hsx")) != EOF)
-               switch(ch) {
+       while ((ch = getopt(argc, argv, "HLPXdf:hsx")) != -1)
+               switch (ch) {
                case 'H':
                        ftsoptions |= FTS_COMFOLLOW;
 #if 0  /* XXX necessary? */



Home | Main Index | Thread Index | Old Index