From a9169c1c589bf7c7a29e7905d17e350ce7c7c48e Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mon, 27 Oct 2014 11:08:26 +0100 Subject: [PATCH] util: fix copy-paste error and actually set the new hostname Reported-by: sztanpet on irc --- src/shared/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2