chiark / gitweb /
util: generalize is_localhost() and use it everywhere where applicable
[elogind.git] / src / hostname / hostnamed.c
index 241d2969166cc4c76f2093d06f7e5395bfdec3f2..c2b6d3d6f3d66adceb9fc541da70a1446f714fdd 100644 (file)
@@ -258,7 +258,7 @@ static char* context_fallback_icon_name(Context *c) {
 }
 
 static bool hostname_is_useful(const char *hn) {
-        return !isempty(hn) && !streq(hn, "localhost");
+        return !isempty(hn) && !is_localhost(hn);
 }
 
 static int context_update_kernel_hostname(Context *c) {