summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
committerDaniel Mack <github@zonque.org>2015-11-09 21:56:49 +0100
commitb0bc8dbd73b7d1f66f01849d89acca59c9fbc699 (patch)
treecf4ce91cd4a2c4dcf325ee210aa507b4dc5e78bb /src/core
parent70d54fca18f52e20c07f37a6c86133229521ee47 (diff)
parente1427b138fbf7b7f13bb61187635b882be3ca2b2 (diff)
Merge pull request #1820 from michich/errno-v2
[v2] treewide: treatment of errno and other cleanups
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hostname-setup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c
index cc7515905d..3645f9c515 100644
--- a/src/core/hostname-setup.c
+++ b/src/core/hostname-setup.c
@@ -61,8 +61,9 @@ int hostname_setup(void) {
hn = "localhost";
}
- if (sethostname_idempotent(hn) < 0)
- return log_warning_errno(errno, "Failed to set hostname to <%s>: %m", hn);
+ r = sethostname_idempotent(hn);
+ if (r < 0)
+ return log_warning_errno(r, "Failed to set hostname to <%s>: %m", hn);
log_info("Set hostname to <%s>.", hn);
return 0;