summaryrefslogtreecommitdiff
path: root/src/dbus1-generator/dbus1-generator.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 18:23:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 18:24:30 +0100
commit23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 (patch)
tree28e66fb86dd0cffc3a3cca3cf234cb52c3b64ad3 /src/dbus1-generator/dbus1-generator.c
parent5e03c6e3b517286bbd65b48d88f60e5b83721894 (diff)
treewide: more log_*_errno + return simplifications
Diffstat (limited to 'src/dbus1-generator/dbus1-generator.c')
-rw-r--r--src/dbus1-generator/dbus1-generator.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/dbus1-generator/dbus1-generator.c b/src/dbus1-generator/dbus1-generator.c
index 5d3b1a856a..21e9e9ca73 100644
--- a/src/dbus1-generator/dbus1-generator.c
+++ b/src/dbus1-generator/dbus1-generator.c
@@ -102,10 +102,8 @@ static int create_dbus_files(
}
r = fflush_and_check(f);
- if (r < 0) {
- log_error_errno(r, "Failed to write %s: %m", a);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to write %s: %m", a);
fclose(f);
f = NULL;
@@ -139,10 +137,8 @@ static int create_dbus_files(
service);
r = fflush_and_check(f);
- if (r < 0) {
- log_error_errno(r, "Failed to write %s: %m", b);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to write %s: %m", b);
lnk = strjoin(arg_dest_late, "/" SPECIAL_BUSNAMES_TARGET ".wants/", name, ".busname", NULL);
if (!lnk)
@@ -331,10 +327,8 @@ int main(int argc, char *argv[]) {
path = "/usr/share/dbus-1/system-services";
type = "system";
units = SYSTEM_DATA_UNIT_PATH;
- } else {
- log_error_errno(r, "Failed to determine whether we are running as user or system instance: %m");
- return r;
- }
+ } else
+ return log_error_errno(r, "Failed to determine whether we are running as user or system instance: %m");
r = parse_dbus_fragments(path, type);