summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/hostname-util.c6
-rw-r--r--src/basic/hostname-util.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index 21fae89fd0..95d9c3dd83 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -105,7 +105,7 @@ bool hostname_is_valid(const char *s, bool relax) {
return true;
}
-char* hostname_cleanup(char *s, bool lowercase) {
+char* hostname_cleanup(char *s) {
char *p, *d;
bool dot;
@@ -119,7 +119,7 @@ char* hostname_cleanup(char *s, bool lowercase) {
*(d++) = '.';
dot = true;
} else if (hostname_valid_char(*p)) {
- *(d++) = lowercase ? tolower(*p) : *p;
+ *(d++) = *p;
dot = false;
}
@@ -185,7 +185,7 @@ int read_hostname_config(const char *path, char **hostname) {
truncate_nl(l);
if (l[0] != '\0' && l[0] != '#') {
/* found line with value */
- name = hostname_cleanup(l, false);
+ name = hostname_cleanup(l);
name = strdup(name);
if (!name)
return -ENOMEM;
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h
index ecae3a267c..6f2b5b66ff 100644
--- a/src/basic/hostname-util.h
+++ b/src/basic/hostname-util.h
@@ -30,7 +30,7 @@ bool hostname_is_set(void);
char* gethostname_malloc(void);
bool hostname_is_valid(const char *s, bool relax) _pure_;
-char* hostname_cleanup(char *s, bool lowercase);
+char* hostname_cleanup(char *s);
bool is_localhost(const char *hostname);