]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation...
authorJason R. Coombs <jaraco@jaraco.com>
Sun, 10 Nov 2013 18:43:22 +0000 (13:43 -0500)
committerJason R. Coombs <jaraco@jaraco.com>
Sun, 10 Nov 2013 18:43:22 +0000 (13:43 -0500)
Modules/socketmodule.c

index 6c4b050371aa335f78b0891166b592bbfd399f6e..fa61cfd02f88e5c9292e84597e60d4b024af18bb 100644 (file)
@@ -5188,7 +5188,11 @@ socket_inet_ntop(PyObject *self, PyObject *args)
     int len;
     struct sockaddr_in6 addr;
     DWORD addrlen, ret, retlen;
-    char ip[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
+#ifdef ENABLE_IPV6
+    char ip[Py_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
+#else
+    char ip[INET_ADDRSTRLEN + 1];
+#endif
 
     /* Guarantee NUL-termination for PyUnicode_FromString() below */
     memset((void *) &ip[0], '\0', sizeof(ip));