From: Lennart Poettering Date: Fri, 19 Aug 2016 01:16:16 +0000 (+0200) Subject: hostnamectl: rework pretty hostname validation (#3985) X-Git-Tag: v232.2~86 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=92842665f9dc63bc7f1671bed792a8e58014f952 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. --- diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c index a5cb62eb6..5aebd89e3 100644 --- a/src/basic/hostname-util.c +++ b/src/basic/hostname-util.c @@ -168,7 +168,6 @@ char* hostname_cleanup(char *s) { *(d++) = *p; dot = false; } - } if (dot && d > s)