diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-02-28 21:46:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-02-28 21:46:50 -0500 |
commit | 47e919424da36ab1cf92c6829bca69d7811d4b14 (patch) | |
tree | ff1ef2d6293a019fc6c7b8e834d0f9db1512e063 /src/or/control.c | |
parent | 897b0ebbace3a14cc02e8a281a87e7db156fbd53 (diff) | |
download | tor-47e919424da36ab1cf92c6829bca69d7811d4b14.tar.gz tor-47e919424da36ab1cf92c6829bca69d7811d4b14.zip |
Tweak users of snprintf to use asprintf where appropriate
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c index 5101fdef42..4fc9b7f345 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1883,18 +1883,18 @@ static char * list_getinfo_options(void) { int i; - char buf[300]; + char *buf=NULL; smartlist_t *lines = smartlist_create(); char *ans; for (i = 0; getinfo_items[i].varname; ++i) { if (!getinfo_items[i].desc) continue; - tor_snprintf(buf, sizeof(buf), "%s%s -- %s\n", + tor_asprintf(&buf, "%s%s -- %s\n", getinfo_items[i].varname, getinfo_items[i].is_prefix ? "*" : "", getinfo_items[i].desc); - smartlist_add(lines, tor_strdup(buf)); + smartlist_add(lines, buf); } smartlist_sort_strings(lines); |