diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-13 10:44:17 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-13 14:18:15 -0800 |
commit | 496bdd684935b9b7156222fec7009e8aa4a8dbad (patch) | |
tree | 616314cd15db940a7d1bc55fa3b16f89eb0bfad8 | |
parent | da0bcc8b8746cd3eb93f20d61145edc6a1040dda (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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } } |