Subject: bin/23994: ac(8) - remove stray argument from getopt/ remove break that is never reached
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jeffi@rcn.com>
List: netbsd-bugs
Date: 01/05/2004 22:40:22
>Number:         23994
>Category:       bin
>Synopsis:       ac(8) - remove stray argument from getopt/ remove break that is never reached
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 05 22:41:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Ito
>Release:        1.6ZG
>Organization:
>Environment:
NetBSD 1.6ZG Fri Dec  5 15:13:48 EST 2003
>Description:
ac.c, getopt still looks for -c (killed long ago)
remove unneeded break; after usage();
>How-To-Repeat:
N/A
>Fix:
Index: ac.c
===================================================================
RCS file: /cvs/nbsd/src/usr.sbin/ac/ac.c,v
retrieving revision 1.17
diff -u -r1.17 ac.c
--- ac.c        12 Nov 2003 13:31:07 -0000      1.17
+++ ac.c        5 Jan 2004 22:31:03 -0000
@@ -306,7 +306,7 @@
        int c;
 
        fp = NULL;
-       while ((c = getopt(argc, argv, "Dc:dpt:w:")) != -1) {
+       while ((c = getopt(argc, argv, "Ddpt:w:")) != -1) {
                switch (c) {
 #ifdef DEBUG
                case 'D':
@@ -328,7 +328,6 @@
                case '?':
                default:
                        usage();
-                       break;
                }
        }
 

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