diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-02 13:41:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-02 13:41:31 +0200 |
commit | fecc80c1ba2eed9dadb9a10c15508c356bcc5fc1 (patch) | |
tree | 8db82ae690416827c910683432c9746f365acf2e /src/network/networkd-link.c | |
parent | 9a00f57a5ba7ed431e6bac8d8b36518708503b4e (diff) |
util: generalize is_localhost() and use it everywhere where applicable
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 3324276bcc..660efedc61 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1928,18 +1928,6 @@ static int link_enter_enslave(Link *link) { return 0; } -/* make sure the hostname is not "localhost" */ -static bool is_localhost(const char *hostname) { - assert(hostname); - - return streq(hostname, "localhost") || - streq(hostname, "localhost.") || - endswith(hostname, ".localhost") || - endswith(hostname, ".localhost.") || - endswith(hostname, ".localdomain") || - endswith(hostname, ".localdomain."); -} - static int link_configure(Link *link) { int r; |