X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fhostname-setup.c;h=03b0ce3b4dad805d94b2cb7de2afd3c9bb549e89;hb=f5b51ea7fcb0b6380c3ceb4d4f3f22f647c6fd32;hp=72e4c539eff970cb23e0b740a436847aea1adae6;hpb=56f64d95763a799ba4475daf44d8e9f72a1bd474;p=elogind.git
diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c
index 72e4c539e..03b0ce3b4 100644
--- a/src/core/hostname-setup.c
+++ b/src/core/hostname-setup.c
@@ -19,10 +19,8 @@
along with systemd; If not, see .
***/
-#include
#include
#include
-#include
#include
#include "hostname-setup.h"
@@ -82,10 +80,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;