hostnamectl: rework pretty hostname validation (#3985)
Rework 17eb9a9ddb 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.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
622a0f628c
commit
2ae0858e6c
@@ -163,7 +163,6 @@ char* hostname_cleanup(char *s) {
|
||||
*(d++) = *p;
|
||||
dot = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (dot && d > s)
|
||||
|
||||
Reference in New Issue
Block a user