chiark / gitweb /
util: generalize is_localhost() and use it everywhere where applicable
[elogind.git] / src / network / networkd-link.c
index 3324276bcc5b9c6ea2c1ae001f2d9a6b32563b3b..660efedc61b0d0dd515b1ab1cae219e735cde7d8 100644 (file)
@@ -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;