Kaydet (Commit) 8ec784c2 authored tarafından Jason R. Coombs's avatar Jason R. Coombs

Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix).

üst da0fc14d
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment