mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 11:57:43 +08:00
optimize acl_valid_unix API in acl_valid_hostname.c
This commit is contained in:
parent
de4805a6c8
commit
5177e4f43e
@ -103,6 +103,9 @@ int acl_valid_hostname(const char *name, int gripe)
|
||||
|
||||
int acl_valid_unix(const char *addr)
|
||||
{
|
||||
if (strchr(addr, '/') != NULL)
|
||||
return 1;
|
||||
|
||||
return !acl_valid_hostaddr(addr, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user