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): rename local variable in ModifyWord_Root



details:   https://anonhg.NetBSD.org/src/rev/65f4b0eb16c1
branches:  trunk
changeset: 957418:65f4b0eb16c1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 28 10:09:28 2020 +0000

description:
make(1): rename local variable in ModifyWord_Root

The name 'dot' conflicted with the global variable from dir.c when make
was compiled in all-in-one mode.

diffstat:

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

diffs (29 lines):

diff -r 28edfdbad6e3 -r 65f4b0eb16c1 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Nov 28 10:07:26 2020 +0000
+++ b/usr.bin/make/var.c        Sat Nov 28 10:09:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.697 2020/11/28 10:07:26 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.698 2020/11/28 10:09:28 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.697 2020/11/28 10:07:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.698 2020/11/28 10:09:28 rillig Exp $");
 
 #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
 #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -1136,8 +1136,8 @@
 static void
 ModifyWord_Root(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
-    const char *dot = strrchr(word, '.');
-    size_t len = dot != NULL ? (size_t)(dot - word) : strlen(word);
+    const char *lastDot = strrchr(word, '.');
+    size_t len = lastDot != NULL ? (size_t)(lastDot - word) : strlen(word);
     SepBuf_AddBytes(buf, word, len);
 }
 



Home | Main Index | Thread Index | Old Index