summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-04-02 12:30:46 -0400
committerNick Mathewson <nickm@torproject.org>2010-04-02 12:30:46 -0400
commit927425150b3266aefcd9155a502165e05e4e6e5c (patch)
tree6184c1c993c253daac52c444448812eed51a5f1f /src/or/control.c
parentcae769d646e721efff3c286a2c46769680dc01f5 (diff)
parent47e919424da36ab1cf92c6829bca69d7811d4b14 (diff)
downloadtor-927425150b3266aefcd9155a502165e05e4e6e5c.tar.gz
tor-927425150b3266aefcd9155a502165e05e4e6e5c.zip
Merge branch 'asprintf'
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c6
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);