summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-14 15:56:25 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-14 15:56:25 -0500
commit6aeabd454e67a370d9b5793a488bdf6d83c61ec7 (patch)
tree8a8ebf950d99ed36fd7eb6e91c38adfceb9176b1 /src/or
parent192be006919c0bef04b7fce9e53c88ec1fcf4219 (diff)
downloadtor-6aeabd454e67a370d9b5793a488bdf6d83c61ec7.tar.gz
tor-6aeabd454e67a370d9b5793a488bdf6d83c61ec7.zip
Reindent the body of get_data_directory()
I don't know why it wasn't indented properly, but we may as well fix it now.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/or/config.c b/src/or/config.c
index ad5c3143f3..0cbf2954ff 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -7700,25 +7700,25 @@ get_data_directory(const char *val)
d = "~/.tor";
if (!strcmpstart(d, "~/")) {
- char *fn = expand_filename(d);
- if (!fn) {
- log_warn(LD_CONFIG,"Failed to expand filename \"%s\".", d);
- return NULL;
- }
- if (!val && !strcmp(fn,"/.tor")) {
- /* If our homedir is /, we probably don't want to use it. */
- /* Default to LOCALSTATEDIR/tor which is probably closer to what we
- * want. */
- log_warn(LD_CONFIG,
- "Default DataDirectory is \"~/.tor\". This expands to "
- "\"%s\", which is probably not what you want. Using "
- "\"%s"PATH_SEPARATOR"tor\" instead", fn, LOCALSTATEDIR);
- tor_free(fn);
- fn = tor_strdup(LOCALSTATEDIR PATH_SEPARATOR "tor");
- }
- return fn;
- }
- return tor_strdup(d);
+ char *fn = expand_filename(d);
+ if (!fn) {
+ log_warn(LD_CONFIG,"Failed to expand filename \"%s\".", d);
+ return NULL;
+ }
+ if (!val && !strcmp(fn,"/.tor")) {
+ /* If our homedir is /, we probably don't want to use it. */
+ /* Default to LOCALSTATEDIR/tor which is probably closer to what we
+ * want. */
+ log_warn(LD_CONFIG,
+ "Default DataDirectory is \"~/.tor\". This expands to "
+ "\"%s\", which is probably not what you want. Using "
+ "\"%s"PATH_SEPARATOR"tor\" instead", fn, LOCALSTATEDIR);
+ tor_free(fn);
+ fn = tor_strdup(LOCALSTATEDIR PATH_SEPARATOR "tor");
+ }
+ return fn;
+ }
+ return tor_strdup(d);
#endif /* defined(_WIN32) */
}