diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-15 16:40:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-15 16:40:11 -0400 |
commit | 76c33f7ff46df47df0cc880595c4d943d50f019b (patch) | |
tree | 11448ec9afd6990160ce6212c020d3c2630448d6 /src/or/rendservice.c | |
parent | c1deabd3b0c9e2701696afc80ac8392f0efda2c7 (diff) | |
parent | a28e239b171c1a69fd32b6583bca0559f7116445 (diff) | |
download | tor-76c33f7ff46df47df0cc880595c4d943d50f019b.tar.gz tor-76c33f7ff46df47df0cc880595c4d943d50f019b.zip |
Merge branch 'scan-build-032'
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 7127ed1ccd..f67e332b7f 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -696,7 +696,6 @@ rend_config_service(const config_line_t *line_, * of authorized clients. */ smartlist_t *type_names_split, *clients; const char *authname; - int num_clients; if (service->auth_type != REND_NO_AUTH) { log_warn(LD_CONFIG, "Got multiple HiddenServiceAuthorizeClient " "lines for a single service."); @@ -740,14 +739,15 @@ rend_config_service(const config_line_t *line_, SMARTLIST_FOREACH(type_names_split, char *, cp, tor_free(cp)); smartlist_free(type_names_split); /* Remove duplicate client names. */ - num_clients = smartlist_len(clients); - smartlist_sort_strings(clients); - smartlist_uniq_strings(clients); - if (smartlist_len(clients) < num_clients) { - log_info(LD_CONFIG, "HiddenServiceAuthorizeClient contains %d " - "duplicate client name(s); removing.", - num_clients - smartlist_len(clients)); - num_clients = smartlist_len(clients); + { + int num_clients = smartlist_len(clients); + smartlist_sort_strings(clients); + smartlist_uniq_strings(clients); + if (smartlist_len(clients) < num_clients) { + log_info(LD_CONFIG, "HiddenServiceAuthorizeClient contains %d " + "duplicate client name(s); removing.", + num_clients - smartlist_len(clients)); + } } SMARTLIST_FOREACH_BEGIN(clients, const char *, client_name) { |