Use INADDR_BROADCAST instead of hard-coded value (it's part of POSIX and

already appears without #ifdef a couple lines above).
This commit is contained in:
Charles-François Natali 2013-08-31 14:48:25 +02:00
parent fcfb324e81
commit 24aa041731

View file

@ -4940,7 +4940,7 @@ socket_inet_aton(PyObject *self, PyObject *args)
/* special-case this address as inet_addr might return INADDR_NONE
* for this */
if (strcmp(ip_addr, "255.255.255.255") == 0) {
packed_addr = 0xFFFFFFFF;
packed_addr = INADDR_BROADCAST;
} else {
packed_addr = inet_addr(ip_addr);