summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2016-08-11 10:41:38 +0200
committerChristoph Lohmann <20h@r-36.net>2016-08-11 10:41:38 +0200
commit6c8da4c851b85c6167f3104158089d9a4fe11ca7 (patch)
tree39c0308b5edc84f5c0c36ac7bd1aa7a8b2382f46
parent31ec0fb93d84e7d9f324340de790076e78911b11 (diff)
downloadsurf-6c8da4c851b85c6167f3104158089d9a4fe11ca7.tar.gz
surf-6c8da4c851b85c6167f3104158089d9a4fe11ca7.tar.bz2
surf-6c8da4c851b85c6167f3104158089d9a4fe11ca7.zip
Style change. (Test commit for new update script in hackers@)
-rw-r--r--surf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/surf.c b/surf.c
index 7fcd17e..46aef68 100644
--- a/surf.c
+++ b/surf.c
@@ -333,10 +333,11 @@ buildpath(const char *path)
p = (char *)&path[1];
homedir = getcurrentuserhomedir();
} else {
- if ((p = strchr(path, '/')))
+ if ((p = strchr(path, '/'))) {
name = g_strndup(&path[1], --p - path);
- else
+ } else {
name = g_strdup(&path[1]);
+ }
homedir = getuserhomedir(name);
g_free(name);