summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-04-14 10:14:41 +0200
commit8fae819099a189f03213ee657f44545c1b035f7e (patch)
treea398d2aea2046ae90f149288f9df9befc8d7e4fb /src/core/unit.c
parent43bbb8f005177bcad135ec894419361f0f420034 (diff)
parent78df0edc1b594017b1d3493eb2033d8a92d9d43f (diff)
Merge pull request #3033 from keszybz/code-cleanups
Code cleanups
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index fb88260d23..c60ae2be9d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2518,12 +2518,11 @@ int unit_install_bus_match(Unit *u, sd_bus *bus, const char *name) {
return -EBUSY;
match = strjoina("type='signal',"
- "sender='org.freedesktop.DBus',"
- "path='/org/freedesktop/DBus',"
- "interface='org.freedesktop.DBus',"
- "member='NameOwnerChanged',"
- "arg0='", name, "'",
- NULL);
+ "sender='org.freedesktop.DBus',"
+ "path='/org/freedesktop/DBus',"
+ "interface='org.freedesktop.DBus',"
+ "member='NameOwnerChanged',"
+ "arg0='", name, "'");
return sd_bus_add_match(bus, &u->match_bus_slot, match, signal_name_owner_changed, u);
}
@@ -3437,7 +3436,7 @@ int unit_write_drop_in_private(Unit *u, UnitSetPropertiesMode mode, const char *
if (!IN_SET(mode, UNIT_PERSISTENT, UNIT_RUNTIME))
return 0;
- ndata = strjoina("[", UNIT_VTABLE(u)->private_section, "]\n", data, NULL);
+ ndata = strjoina("[", UNIT_VTABLE(u)->private_section, "]\n", data);
return unit_write_drop_in(u, mode, name, ndata);
}
@@ -3480,11 +3479,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)