From: Michal Sekletar Date: Mon, 27 Oct 2014 10:08:26 +0000 (+0100) Subject: util: fix copy-paste error and actually set the new hostname X-Git-Tag: v217~61 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=a9169c1c589bf7c7a29e7905d17e350ce7c7c48e util: fix copy-paste error and actually set the new hostname Reported-by: sztanpet on irc --- diff --git a/src/shared/util.c b/src/shared/util.c index 7d94a2830..4143f6d64 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -7189,7 +7189,7 @@ int sethostname_idempotent(const char *s) { if (streq(buf, s)) return 0; - r = sethostname(buf, strlen(buf)); + r = sethostname(s, strlen(s)); if (r < 0) return -errno;