summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 10:44:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:18:15 -0800
commit496bdd684935b9b7156222fec7009e8aa4a8dbad (patch)
tree616314cd15db940a7d1bc55fa3b16f89eb0bfad8
parentda0bcc8b8746cd3eb93f20d61145edc6a1040dda (diff)
Rename variable 'dup' to avoid shadowing dup() function
As recommended by cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xrdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xrdb.c b/xrdb.c
index aad27d4..a183199 100644
--- a/xrdb.c
+++ b/xrdb.c
@@ -918,19 +918,19 @@ main(int argc, char *argv[])
= (sizeof cpp_locations) / (sizeof cpp_locations[0]);
for (int j = 0; j < number_of_elements; j++) {
- char *end, *dup;
+ char *end, *cmd;
/* cut off arguments */
- dup = strdup(cpp_locations[j]);
- end = strchr(dup, ' ');
+ cmd = strdup(cpp_locations[j]);
+ end = strchr(cmd, ' ');
if (end)
*end = '\0';
- if (access(dup, X_OK) == 0) {
+ if (access(cmd, X_OK) == 0) {
cpp_program = cpp_locations[j];
- free(dup);
+ free(cmd);
break;
}
- free(dup);
+ free(cmd);
}
}