summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-19 03:16:16 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-08-18 21:16:16 -0400
commit2ae0858e6c12018def32921e5d732395c74c4379 (patch)
tree35addc58ab98539792c03c20d288a1c6e2c1916d /src/basic
parent622a0f628cee51851ad00856f9efddedf0799edb (diff)
hostnamectl: rework pretty hostname validation (#3985)
Rework 17eb9a9ddba3f03fcba33445c1c1eedeb948da04 a bit. Let's make sure we don't clobber the input parameter args[1], following our coding style to not clobber parameters unless explicitly indicated. (in particular, as we don't want to have our changes appear in the command line shown in "ps"...) No functional change.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/hostname-util.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index 13c3bb6446..e44a357287 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -163,7 +163,6 @@ char* hostname_cleanup(char *s) {
*(d++) = *p;
dot = false;
}
-
}
if (dot && d > s)