diff options
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/hostname-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c index 3cd2f2c872..5a7ee87a20 100644 --- a/src/basic/hostname-util.c +++ b/src/basic/hostname-util.c @@ -150,6 +150,8 @@ char* hostname_cleanup(char *s) { assert(s); + strshorten(s, HOST_NAME_MAX); + for (p = s, d = s, dot = true; *p; p++) { if (*p == '.') { if (dot) @@ -169,8 +171,6 @@ char* hostname_cleanup(char *s) { else *d = 0; - strshorten(s, HOST_NAME_MAX); - return s; } |