aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-03 10:09:20 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-03 10:09:20 -0500
commit6b3c07648ce5860f5ef0f4193eb812e971c02407 (patch)
tree474aee860331c0c7515ac42188b0d4117c370265 /src/or/hs_common.c
parentb62b40a572d8693daa5851eee5f423007535b3b6 (diff)
parent9ef97a268b06fed7b07908823600911a2a6eadc1 (diff)
downloadtor-6b3c07648ce5860f5ef0f4193eb812e971c02407.tar.gz
tor-6b3c07648ce5860f5ef0f4193eb812e971c02407.zip
Merge branch 'maint-0.3.2'
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 2c0c2aecd2..4c56b2d11f 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