chiark / gitweb /
hostnamed: make use of in_charset() to verify charset
[elogind.git] / src / hostname / hostnamed.c
index 19ab500533696fb3d13a361218538a94ee8ed3a0..d826a31da96a3838a34a40a329b36d6ddd51a39b 100644 (file)
@@ -155,7 +155,7 @@ static bool valid_chassis(const char *chassis) {
 static bool valid_deployment(const char *deployment) {
         assert(deployment);
 
-        return strspn(deployment, VALID_DEPLOYMENT_CHARS) == strlen(deployment);
+        return in_charset(deployment, VALID_DEPLOYMENT_CHARS);
 }
 
 static const char* fallback_chassis(void) {