aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-28 11:24:03 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 11:24:03 -0400
commitdffc6910b11d88544a93c3e3e80c1155f998f561 (patch)
tree61330313d05c9d055d0178d694138465da1c5748 /src/common/util.c
parent9fe6fea1cceb39fc415ad813020bbd863121e0c9 (diff)
downloadtor-dffc6910b11d88544a93c3e3e80c1155f998f561.tar.gz
tor-dffc6910b11d88544a93c3e3e80c1155f998f561.zip
Three more -Wshadow fixes.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 0c04eb10ae..c7dd2a8af7 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -279,21 +279,21 @@ tor_reallocarray_(void *ptr, size_t sz1, size_t sz2 DMALLOC_PARAMS)
char *
tor_strdup_(const char *s DMALLOC_PARAMS)
{
- char *dup;
+ char *duplicate;
tor_assert(s);
#ifdef USE_DMALLOC
- dup = dmalloc_strdup(file, line, s, 0);
+ duplicate = dmalloc_strdup(file, line, s, 0);
#else
- dup = strdup(s);
+ duplicate = strdup(s);
#endif
- if (PREDICT_UNLIKELY(dup == NULL)) {
+ if (PREDICT_UNLIKELY(duplicate == NULL)) {
/* LCOV_EXCL_START */
log_err(LD_MM,"Out of memory on strdup(). Dying.");
exit(1);
/* LCOV_EXCL_STOP */
}
- return dup;
+ return duplicate;
}
/** Allocate and return a new string containing the first <b>n</b>