summaryrefslogtreecommitdiff
path: root/src/dbus1-generator/dbus1-generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus1-generator/dbus1-generator.c')
-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;
}