summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-16 11:46:20 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-16 11:46:20 -0500
commit31838bd7833b231e818fed7c1774cee8bd6ca4d7 (patch)
treed1f5bea70bbbf29e3f51788f6dd4533cd5b85891 /src/or/control.c
parent6bb31cba1286e843ac7d32a24a9424587bc29623 (diff)
downloadtor-31838bd7833b231e818fed7c1774cee8bd6ca4d7.tar.gz
tor-31838bd7833b231e818fed7c1774cee8bd6ca4d7.zip
changes suggested by weasel
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 21d2e09856..a569c962c4 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1439,11 +1439,13 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
if (!strcmp(question, "version")) {
*answer = tor_strdup(get_version());
} else if (!strcmp(question, "config-file")) {
- if (get_torrc_fname(0))
- *answer = tor_strdup(get_torrc_fname(0));
+ const char *a = get_torrc_fname(0);
+ if (a)
+ *answer = tor_strdup(a);
} else if (!strcmp(question, "config-defaults-file")) {
- if (get_torrc_fname(1))
- *answer = tor_strdup(get_torrc_fname(1));
+ const char *a = get_torrc_fname(1);
+ if (a)
+ *answer = tor_strdup(a);
} else if (!strcmp(question, "config-text")) {
*answer = options_dump(get_options(), OPTIONS_DUMP_MINIMAL);
} else if (!strcmp(question, "info/names")) {