ref: 7bdfc9da23180937b014c13495aaaae62176fcdd
parent: d073cffa7438fbe62fbdebd9bcaaa39303ee04e9
author: Rangi <[email protected]>
date: Tue Nov 30 12:06:36 EST 2021
Really don't use `new` as a variable name
--- a/src/asm/parser.y
+++ b/src/asm/parser.y
@@ -218,10 +218,10 @@
return (uint32_t)pos;
}
-static void strrpl(char *dest, size_t destLen, char const *src, char const *old, char const *new)
+static void strrpl(char *dest, size_t destLen, char const *src, char const *old, char const *rep)
{
size_t oldLen = strlen(old);
- size_t newLen = strlen(new);
+ size_t repLen = strlen(rep);
size_t i = 0;
if (!oldLen) {
@@ -240,8 +240,8 @@
break;
// Copy the replacement substring
- memcpy(dest + i, new, newLen < destLen - i ? newLen : destLen - i);
- i += newLen;
+ memcpy(dest + i, rep, repLen < destLen - i ? repLen : destLen - i);
+ i += repLen;
if (i >= destLen)
break;
--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -1268,12 +1268,12 @@
#define SPEC_H TRASH_HEADER_SUM
#define SPEC_g FIX_GLOBAL_SUM
#define SPEC_G TRASH_GLOBAL_SUM
-#define overrideSpec(new, bad) \
+#define overrideSpec(cur, bad) \
do { \
if (fixSpec & SPEC_##bad) \
fprintf(stderr, \
- "warning: '" #new "' overriding '" #bad "' in fix spec\n"); \
- fixSpec = (fixSpec & ~SPEC_##bad) | SPEC_##new; \
+ "warning: '" #cur "' overriding '" #bad "' in fix spec\n"); \
+ fixSpec = (fixSpec & ~SPEC_##bad) | SPEC_##cur; \
} while (0)
case 'l':
overrideSpec(l, L);