iface: some command decoupling

This commit is contained in:
Jan Engelhardt
2009-04-26 21:56:53 +02:00
parent e1fc5f2086
commit 0d36136f54
2 changed files with 5 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ static bool iface_valid_name(const char *name)
{
char invalid_chars[] = ".+!*";
return !(strlen(name) >= IFNAMSIZ || strcspn(name, invalid_chars) != strlen(name));
return strlen(name) < IFNAMSIZ && strpbrk(name, invalid_chars) == NULL;
}
static void iface_mt_help(void)