summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-08 22:20:22 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-13 08:56:44 -0400
commit78e334b50f12a3ef386fb5de03d0549fa853c692 (patch)
tree975b79ccda731585d9bc56a2ef0baa830d833dc2 /src/core/unit.c
parent025ef1d2264b24e77283d312dede8af01fa050f6 (diff)
basic/util: silence stupid gcc warnings about unitialized variable
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index fb88260d23..49c990c2d7 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3480,11 +3480,12 @@ int unit_make_transient(Unit *u) {
/* Let's open the file we'll write the transient settings into. This file is kept open as long as we are
* creating the transient, and is closed in unit_load(), as soon as we start loading the file. */
- RUN_WITH_UMASK(0022)
+ RUN_WITH_UMASK(0022) {
f = fopen(path, "we");
- if (!f) {
- free(path);
- return -errno;
+ if (!f) {
+ free(path);
+ return -errno;
+ }
}
if (u->transient_file)