mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 18:43:12 +02:00
Remove is_ip_valid() as we already have is_valid_ip(), and update
the doxygen docs a bit for that function.
This commit is contained in:
-15
@@ -2308,21 +2308,6 @@ char *url_getfilename(const char *url)
|
||||
return raw_strdup("-");
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks whether given string contains a valid IP address.
|
||||
*/
|
||||
int is_ip_valid(const char *ip)
|
||||
{
|
||||
char scratch[64];
|
||||
if (BadPtr(ip))
|
||||
return 0;
|
||||
if (inet_pton(AF_INET, ip, scratch) == 1)
|
||||
return 1;
|
||||
if (inet_pton(AF_INET6, ip, scratch) == 1)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess
|
||||
// mode value Checks file for
|
||||
|
||||
Reference in New Issue
Block a user