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 ParseFindKeyword
details: https://anonhg.NetBSD.org/src/rev/3d6eae4f0b55
branches: trunk
changeset: 946444:3d6eae4f0b55
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 28 10:05:49 2020 +0000
description:
make(1): rename local variable in ParseFindKeyword
It conflicts with the global 'cur'.
diffstat:
usr.bin/make/parse.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 0ad6e30bb5b8 -r 3d6eae4f0b55 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Nov 28 10:00:25 2020 +0000
+++ b/usr.bin/make/parse.c Sat Nov 28 10:05:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.451 2020/11/23 23:41:11 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.452 2020/11/28 10:05:49 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.451 2020/11/23 23:41:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.452 2020/11/28 10:05:49 rillig Exp $");
/* types and constants */
@@ -594,15 +594,15 @@
int end = sizeof parseKeywords / sizeof parseKeywords[0] - 1;
do {
- int cur = start + (end - start) / 2;
- int diff = strcmp(str, parseKeywords[cur].name);
+ int curr = start + (end - start) / 2;
+ int diff = strcmp(str, parseKeywords[curr].name);
if (diff == 0)
- return cur;
+ return curr;
if (diff < 0)
- end = cur - 1;
+ end = curr - 1;
else
- start = cur + 1;
+ start = curr + 1;
} while (start <= end);
return -1;
Home |
Main Index |
Thread Index |
Old Index