chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
util: introduce sethostname_idempotent
[elogind.git]
/
src
/
hostname
/
hostnamed.c
diff --git
a/src/hostname/hostnamed.c
b/src/hostname/hostnamed.c
index 0cffb5f683a742f0febcd2fdd2c6181f4e3f8dac..a449610bb86c2593c3d0408ebab2dc82990b2293 100644
(file)
--- a/
src/hostname/hostnamed.c
+++ b/
src/hostname/hostnamed.c
@@
-287,7
+287,7
@@
static int context_update_kernel_hostname(Context *c) {
else
hn = "localhost";
- if (sethostname
(hn, strlen(hn)
) < 0)
+ if (sethostname
_idempotent(hn
) < 0)
return -errno;
return 0;