Subject: bin/25621: shuffle(1)'s -0 option not reflected in getopt()
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jeffi@rcn.com>
List: netbsd-bugs
Date: 05/18/2004 01:58:36
>Number:         25621
>Category:       bin
>Synopsis:       shuffle(1)'s -0 option not reflected in getopt()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 18 01:59:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Ito
>Release:        NetBSD 2.0E
>Organization:
>Environment:
NetBSD netbsd 2.0E NetBSD 2.0E (LAB) #0: Fri May 14 08:43:46 EDT 2004
>Description:
Add missing 0 option to getopt.
>How-To-Repeat:
n/a
>Fix:
Index: shuffle.c
===================================================================
RCS file: /cvs/nbsd/src/usr.bin/shuffle/shuffle.c,v
retrieving revision 1.15
diff -u -r1.15 shuffle.c
--- shuffle.c   5 Jan 2004 23:23:36 -0000       1.15
+++ shuffle.c   18 May 2004 01:54:33 -0000
@@ -207,7 +207,7 @@
        size_t nlines = 0, pick = 0;
        char sep = '\n';

-       while ((ch = getopt(argc, argv, "f:n:p:")) != -1) {
+       while ((ch = getopt(argc, argv, "0f:n:p:")) != -1) {
                switch(ch) {
                case '0':
                        sep = '\0';

>Release-Note:
>Audit-Trail:
>Unformatted: