diff options
Diffstat (limited to 'src/core/hostname-setup.c')
-rw-r--r-- | src/core/hostname-setup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c index 72e4c539ef..6664e8952c 100644 --- a/src/core/hostname-setup.c +++ b/src/core/hostname-setup.c @@ -82,10 +82,8 @@ int hostname_setup(void) { hn = "localhost"; } - if (sethostname_idempotent(hn) < 0) { - log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn); - return -errno; - } + if (sethostname_idempotent(hn) < 0) + return log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn); log_info("Set hostname to <%s>.", hn); return 0; |