summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2021-05-10 15:36:48 -0500
committerMichael Catanzaro <mcatanzaro@gnome.org>2021-05-10 15:36:48 -0500
commitc8e28ef2de11446a1a1a81e44563bd01db25c1fb (patch)
treef1c5d82107c7fa7c5b19ce7cd4a3af8c72e79adf
parent730cc864efc8b2a1b66cae398c4b9cd374f93b5d (diff)
downloadglib-mcatanzaro/kill-inet-aton.tar.gz
gresolver: use inet_pton()mcatanzaro/kill-inet-aton
inet_aton() is obsolete and triggering a downstream disallowed function call checker. It can be trivially replaced with inet_pton() instead.
-rw-r--r--gio/gresolver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/gresolver.c b/gio/gresolver.c
index cd5445a65..3fcb346bf 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -369,10 +369,10 @@ handle_ip_address_or_localhost (const char *hostname,
/* Reject non-standard IPv4 numbers-and-dots addresses.
* g_inet_address_new_from_string() will have accepted any "real" IP
- * address, so if inet_aton() succeeds, then it's an address we want
+ * address, so if inet_pton() succeeds, then it's an address we want
* to reject.
*/
- if (inet_aton (hostname, &ip4addr))
+ if (inet_pton (AF_INET, hostname, &ip4addr))
#endif
{
#ifdef G_OS_WIN32