Always use curly braces for if and else.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 11 Oct 2018 22:10:48 +0000 (00:10 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 11 Oct 2018 22:10:48 +0000 (00:10 +0200)
src/util.c

index 1d07b0b..5844ff7 100644 (file)
@@ -365,8 +365,9 @@ char *util_file_set_content(const char *file, const char *contents)
     struct stat st;
 
     mode = 0600;
-    if (stat(file, &st) == 0)
+    if (stat(file, &st) == 0) {
         mode = st.st_mode;
+    }
 
     /* Create a temporary file. */
     tmp_name = g_strconcat(file, ".XXXXXX", NULL);