summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2014-10-27 11:08:26 +0100
committerMichal Sekletar <msekleta@redhat.com>2014-10-27 11:09:39 +0100
commita9169c1c589bf7c7a29e7905d17e350ce7c7c48e (patch)
tree14f8b970ffda31a04b81b02b68af9490f125f1a1 /src/shared/util.c
parent605f81a8968b2df8a28cca2cf11db99ab948a2af (diff)
util: fix copy-paste error and actually set the new hostname
Reported-by: sztanpet on irc
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c2
1 files changed, 1 insertions, 1 deletions
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;