summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-08-31 12:48:25 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2013-08-31 12:48:25 (GMT)
commit24aa041731d06d570bffa3028cc80cca35e10508 (patch)
tree00f255ad6ff87aad06787999636819876f5b85ee /Modules/socketmodule.c
parentfcfb324e817c4362fb83d905d65968cf94e0d68a (diff)
downloadcpython-24aa041731d06d570bffa3028cc80cca35e10508.zip
cpython-24aa041731d06d570bffa3028cc80cca35e10508.tar.gz
cpython-24aa041731d06d570bffa3028cc80cca35e10508.tar.bz2
Use INADDR_BROADCAST instead of hard-coded value (it's part of POSIX and
already appears without #ifdef a couple lines above).
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index ca8dade..b9bc932 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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);