summaryrefslogtreecommitdiff
path: root/src/dbus1-generator
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:57:32 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:57:32 +0100
commit4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f (patch)
treec7a6228e7151aa74bc8e331694a1e795226550cd /src/dbus1-generator
parent56f64d95763a799ba4475daf44d8e9f72a1bd474 (diff)
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
Diffstat (limited to 'src/dbus1-generator')
-rw-r--r--src/dbus1-generator/dbus1-generator.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/dbus1-generator/dbus1-generator.c b/src/dbus1-generator/dbus1-generator.c
index 5a26f38869..10a33efee5 100644
--- a/src/dbus1-generator/dbus1-generator.c
+++ b/src/dbus1-generator/dbus1-generator.c
@@ -58,10 +58,8 @@ static int create_dbus_files(
return log_oom();
f = fopen(a, "wxe");
- if (!f) {
- log_error_errno(errno, "Failed to create %s: %m", a);
- return -errno;
- }
+ if (!f)
+ return log_error_errno(errno, "Failed to create %s: %m", a);
fprintf(f,
"# Automatically generated by systemd-dbus1-generator\n\n"
@@ -116,10 +114,8 @@ static int create_dbus_files(
return log_oom();
f = fopen(b, "wxe");
- if (!f) {
- log_error_errno(errno, "Failed to create %s: %m", b);
- return -errno;
- }
+ if (!f)
+ return log_error_errno(errno, "Failed to create %s: %m", b);
fprintf(f,
"# Automatically generated by systemd-dbus1-generator\n\n"
@@ -145,10 +141,8 @@ static int create_dbus_files(
return log_oom();
mkdir_parents_label(lnk, 0755);
- if (symlink(b, lnk)) {
- log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
- return -errno;
- }
+ if (symlink(b, lnk))
+ return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
return 0;
}
@@ -259,10 +253,8 @@ static int link_busnames_target(const char *units) {
t = strappenda(arg_dest, "/" SPECIAL_BASIC_TARGET ".wants/" SPECIAL_BUSNAMES_TARGET);
mkdir_parents_label(t, 0755);
- if (symlink(f, t) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", t);
- return -errno;
- }
+ if (symlink(f, t) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", t);
return 0;
}
@@ -273,24 +265,18 @@ static int link_compatibility(const char *units) {
f = strappenda(units, "/systemd-bus-proxyd.socket");
t = strappenda(arg_dest, "/" SPECIAL_DBUS_SOCKET);
mkdir_parents_label(t, 0755);
- if (symlink(f, t) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", t);
- return -errno;
- }
+ if (symlink(f, t) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", t);
f = strappenda(units, "/systemd-bus-proxyd.socket");
t = strappenda(arg_dest, "/" SPECIAL_SOCKETS_TARGET ".wants/systemd-bus-proxyd.socket");
mkdir_parents_label(t, 0755);
- if (symlink(f, t) < 0) {
- log_error_errno(errno, "Failed to create symlink %s: %m", t);
- return -errno;
- }
+ if (symlink(f, t) < 0)
+ return log_error_errno(errno, "Failed to create symlink %s: %m", t);
t = strappenda(arg_dest, "/" SPECIAL_DBUS_SERVICE);
- if (symlink("/dev/null", t) < 0) {
- log_error_errno(errno, "Failed to mask %s: %m", t);
- return -errno;
- }
+ if (symlink("/dev/null", t) < 0)
+ return log_error_errno(errno, "Failed to mask %s: %m", t);
return 0;
}