diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-04-02 12:30:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-04-02 12:30:46 -0400 |
commit | 927425150b3266aefcd9155a502165e05e4e6e5c (patch) | |
tree | 6184c1c993c253daac52c444448812eed51a5f1f /src/or/control.c | |
parent | cae769d646e721efff3c286a2c46769680dc01f5 (diff) | |
parent | 47e919424da36ab1cf92c6829bca69d7811d4b14 (diff) | |
download | tor-927425150b3266aefcd9155a502165e05e4e6e5c.tar.gz tor-927425150b3266aefcd9155a502165e05e4e6e5c.zip |
Merge branch 'asprintf'
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 771beaeb58..5797edfdce 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); |