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/ab1ab6c90058
branches: trunk
changeset: 1016677:ab1ab6c90058
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 6e02620c1250 -r ab1ab6c90058 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