X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fhostname-setup.c;h=6664e8952c2b30de430f4b241d0d307f78e30a87;hb=76c37ab6d205c95e8f43ffbc19553b936330195a;hp=72e4c539eff970cb23e0b740a436847aea1adae6;hpb=56f64d95763a799ba4475daf44d8e9f72a1bd474;p=elogind.git diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c index 72e4c539e..6664e8952 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;