From 8fb494435889dcb9e1c09b8c7220e47bab717bf9 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 27 Jul 2015 22:15:26 -0400 Subject: hostname-util: add relax parameter to hostname_is_valid Tests are modified to check behaviour with relax and without relax. New tests are added for hostname_cleanup(). Tests are moved a new file (test-hostname-util) because there's now a bunch of them. New parameter is not used anywhere, except in tests, so there should be no observable change. --- src/basic/hostname-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/basic/hostname-util.h') diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index 0c4763cf5a..ecae3a267c 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -29,7 +29,7 @@ bool hostname_is_set(void); char* gethostname_malloc(void); -bool hostname_is_valid(const char *s) _pure_; +bool hostname_is_valid(const char *s, bool relax) _pure_; char* hostname_cleanup(char *s, bool lowercase); bool is_localhost(const char *hostname); -- cgit v1.2.3-54-g00ecf