chiark / gitweb /
hostnamectl: rework pretty hostname validation (#3985)
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Aug 2016 01:16:16 +0000 (03:16 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:51 +0000 (08:50 +0200)
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.

src/basic/hostname-util.c

index a5cb62eb661e03eaf16682241f82d830ee952e46..5aebd89e34af753b414391616f6595cf79d17ea5 100644 (file)
@@ -168,7 +168,6 @@ char* hostname_cleanup(char *s) {
                         *(d++) = *p;
                         dot = false;
                 }
                         *(d++) = *p;
                         dot = false;
                 }
-
         }
 
         if (dot && d > s)
         }
 
         if (dot && d > s)