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): fix local variable name for determinin...



details:   https://anonhg.NetBSD.org/src/rev/309e7857f044
branches:  trunk
changeset: 1015458:309e7857f044
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 24 04:03:04 2020 +0000

description:
make(1): fix local variable name for determining the basename

diffstat:

 usr.bin/make/arch.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (53 lines):

diff -r e6510739adfb -r 309e7857f044 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Sat Oct 24 04:00:56 2020 +0000
+++ b/usr.bin/make/arch.c       Sat Oct 24 04:03:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.143 2020/10/24 04:00:56 rillig Exp $        */
+/*     $NetBSD: arch.c,v 1.144 2020/10/24 04:03:04 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
 #include    "config.h"
 
 /*     "@(#)arch.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: arch.c,v 1.143 2020/10/24 04:00:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.144 2020/10/24 04:03:04 rillig Exp $");
 
 #ifdef TARGET_MACHINE
 #undef MAKE_MACHINE
@@ -431,9 +431,9 @@
      * Because of space constraints and similar things, files are archived
      * using their basename, not the entire path.
      */
-    const char *base = strrchr(member, '/');
-    if (base != NULL)
-       member = base + 1;
+    const char *lastSlash = strrchr(member, '/');
+    if (lastSlash != NULL)
+       member = lastSlash + 1;
 
     for (ln = archives->first; ln != NULL; ln = ln->next) {
        const Arch *archPtr = ln->datum;
@@ -714,7 +714,7 @@
     int size;                  /* Size of archive member */
     char magic[SARMAG];
     size_t len, tlen;
-    const char *base;
+    const char *lastSlash;
 
     arch = fopen(archive, mode);
     if (arch == NULL)
@@ -734,9 +734,9 @@
      * Because of space constraints and similar things, files are archived
      * using their basename, not the entire path.
      */
-    base = strrchr(member, '/');
-    if (base != NULL)
-       member = base + 1;
+    lastSlash = strrchr(member, '/');
+    if (lastSlash != NULL)
+       member = lastSlash + 1;
 
     len = tlen = strlen(member);
     if (len > sizeof(arhPtr->ar_name)) {



Home | Main Index | Thread Index | Old Index