|
@@ -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")) {
|