diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-01-11 14:02:59 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-01-16 15:03:13 -0500 |
commit | cc02823d7f6acbc3fa8ea87e5646921100796f10 (patch) | |
tree | 45d4ba4a4cc9ef73c076f08934f68d9690b9044c /src/or/dirserv.c | |
parent | edcc9981d8b8894d2ef4e0d617a20d7d99547817 (diff) | |
download | tor-cc02823d7f6acbc3fa8ea87e5646921100796f10.tar.gz tor-cc02823d7f6acbc3fa8ea87e5646921100796f10.zip |
Convert instances of tor_snprintf+strdup into tor_asprintf
These were found by looking for tor_snprintf() instances that were
followed closely by tor_strdup(), though I probably converted some
other snprintfs as well.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index e5995697dd..cc8dffb7ff 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2906,9 +2906,7 @@ generate_v2_networkstatus_opinion(void) contact = "(none)"; if (versioning) { - size_t v_len = 64+strlen(client_versions)+strlen(server_versions); - version_lines = tor_malloc(v_len); - tor_snprintf(version_lines, v_len, + tor_asprintf(&version_lines, "client-versions %s\nserver-versions %s\n", client_versions, server_versions); } else { |