summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-27 22:36:36 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-08-05 20:49:21 -0400
commitae691c1d9382995ea7e28317f5c37023229c27ee (patch)
tree62ecbb70b83af41c523969a33c98efddef4eba35 /src/basic
parent17eb9a9ddba3f03fcba33445c1c1eedeb948da04 (diff)
hostname-util: get rid of unused parameter of hostname_cleanup()
All users are now setting lowercase=false.
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);