Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): make code in ArchSVR4Entry simpler



details:   https://anonhg.NetBSD.org/src/rev/22bf6815ec50
branches:  trunk
changeset: 976485:22bf6815ec50
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 25 14:41:35 2020 +0000

description:
make(1): make code in ArchSVR4Entry simpler

diffstat:

 usr.bin/make/arch.c |  14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diffs (37 lines):

diff -r c0e7de9da17b -r 22bf6815ec50 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Fri Sep 25 14:10:09 2020 +0000
+++ b/usr.bin/make/arch.c       Fri Sep 25 14:41:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.119 2020/09/25 06:49:13 rillig Exp $        */
+/*     $NetBSD: arch.c,v 1.120 2020/09/25 14:41:35 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -133,7 +133,7 @@
 #include    "config.h"
 
 /*     "@(#)arch.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: arch.c,v 1.119 2020/09/25 06:49:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.120 2020/09/25 14:41:35 rillig Exp $");
 
 #ifdef TARGET_MACHINE
 #undef MAKE_MACHINE
@@ -714,17 +714,9 @@
        }
        eptr = ar->fnametab + size;
        for (entry = 0, ptr = ar->fnametab; ptr < eptr; ptr++)
-           switch (*ptr) {
-           case '/':
+           if (*ptr == '/') {
                entry++;
                *ptr = '\0';
-               break;
-
-           case '\n':
-               break;
-
-           default:
-               break;
            }
        if (DEBUG(ARCH)) {
            fprintf(debug_file, "Found svr4 archive name table with %lu entries\n",



Home | Main Index | Thread Index | Old Index