tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit f7adf3653ff313d45d70bed7c0fdcdd0d64f29ab
parent 151d446aa1df2ab67584f4aa7c04be234f18fc91
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon, 19 Oct 2020 11:24:32 -0400

Simplify logic to use smartlist_add_asprintf()

Diffstat:
Msrc/feature/dirclient/dirclient.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c @@ -1995,9 +1995,8 @@ dirclient_dump_total_dls(void) if (options->SafeLogging_ != SAFELOG_SCRUB_NONE && purpose_needs_anonymity(i, ROUTER_PURPOSE_GENERAL, NULL)) continue; - char *line = NULL; - tor_asprintf(&line, "%"PRIu64" (%s)", n, dir_conn_purpose_to_string(i)); - smartlist_add(lines, line); + smartlist_add_asprintf(lines, "%"PRIu64" (%s)", + n, dir_conn_purpose_to_string(i)); } if (smartlist_len(lines) > 0) {