summaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-03 09:13:00 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-03 09:13:00 -0500
commit1bc95633fbd9c27db87d81593242e85d08afe116 (patch)
tree33749e7b0877764ad1d276ece69b97cb15de8df7 /src/or/hs_common.c
parent451c852a0f75fe9ac6935851e763a948c1c5b197 (diff)
downloadtor-1bc95633fbd9c27db87d81593242e85d08afe116.tar.gz
tor-1bc95633fbd9c27db87d81593242e85d08afe116.zip
Fix some shadowed-global warnings.
These are all about local variables shadowing global functions. That isn't normally a problem, but at least one compiler we care about seems to treat this as a case of -Wshadow violation, so let's fix it. Fixes bug 24634; bugfix on 0.3.2.1-alpha.
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index ad783a36fb..a5cfaf03a8 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -984,18 +984,18 @@ hs_build_address(const ed25519_public_key_t *key, uint8_t version,
link_specifier_t *
hs_link_specifier_dup(const link_specifier_t *lspec)
{
- link_specifier_t *dup = link_specifier_new();
- memcpy(dup, lspec, sizeof(*dup));
+ link_specifier_t *result = link_specifier_new();
+ memcpy(result, lspec, sizeof(*result));
/* The unrecognized field is a dynamic array so make sure to copy its
* content and not the pointer. */
link_specifier_setlen_un_unrecognized(
- dup, link_specifier_getlen_un_unrecognized(lspec));
- if (link_specifier_getlen_un_unrecognized(dup)) {
- memcpy(link_specifier_getarray_un_unrecognized(dup),
+ result, link_specifier_getlen_un_unrecognized(lspec));
+ if (link_specifier_getlen_un_unrecognized(result)) {
+ memcpy(link_specifier_getarray_un_unrecognized(result),
link_specifier_getconstarray_un_unrecognized(lspec),
- link_specifier_getlen_un_unrecognized(dup));
+ link_specifier_getlen_un_unrecognized(result));
}
- return dup;
+ return result;
}
/* From a given ed25519 public key pk and an optional secret, compute a