chiark / gitweb /
util: fix copy-paste error and actually set the new hostname
[elogind.git] / src / shared / util.c
index 7d94a28302f7d49d6e54d0c66a06e84cb793e2aa..4143f6d643ebca2cb02c105ba0504d1a55d9f72d 100644 (file)
@@ -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;