X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fhostname%2Fhostnamed.c;h=a449610bb86c2593c3d0408ebab2dc82990b2293;hp=0cffb5f683a742f0febcd2fdd2c6181f4e3f8dac;hb=605f81a8968b2df8a28cca2cf11db99ab948a2af;hpb=caa2f4c0c9613b2e02aafa308c8fb092576014a9 diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 0cffb5f68..a449610bb 100644 --- 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;