Diff between 2892231c6cb014f5731d4d2d5d5650b137119e6d and aa649eeb5e30cf7a037a024a58df7a402c83b65c

Changed Files

File Additions Deletions Status
obexd/src/main.c +4 -2 modified

Full Patch

diff --git a/obexd/src/main.c b/obexd/src/main.c
index 80645f8..0040c1e 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -199,7 +199,8 @@ const char *obex_option_capability(void)
 	return option_capability;
 }
 
-static gboolean is_dir(const char *dir) {
+static gboolean is_dir(const char *dir)
+{
 	struct stat st;
 
 	if (stat(dir, &st) < 0) {
@@ -290,8 +291,9 @@ int main(int argc, char *argv[])
 	}
 
 	if (option_root[0] != '/') {
-		char *old_root = option_root, *home = getenv("HOME");
+		const char *home = getenv("HOME");
 		if (home) {
+			char *old_root = option_root;
 			option_root = g_strdup_printf("%s/%s", home, old_root);
 			g_free(old_root);
 		}