summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-07-19 21:16:41 (GMT)
committerFred Drake <fdrake@acm.org>2001-07-19 21:16:41 (GMT)
commite5065290e79795c655d46475ae7c92ef225ab90e (patch)
treecf85c0ddd2f0a09085c2d3d59b260db7d503c81a /Modules
parent6a16ea07b8159c39e3433d32e5d8efb10aec06c8 (diff)
downloadcpython-e5065290e79795c655d46475ae7c92ef225ab90e.zip
cpython-e5065290e79795c655d46475ae7c92ef225ab90e.tar.gz
cpython-e5065290e79795c655d46475ae7c92ef225ab90e.tar.bz2
Clean up some warnings from the SGI compiler.
This is part of SF patch #434992.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 72b141c..1841024 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -573,7 +573,7 @@ setipaddr(char* name, struct sockaddr_in * addr_ret)
static PyObject *
makeipaddr(struct sockaddr_in *addr)
{
- long x = ntohl(addr->sin_addr.s_addr);
+ unsigned long x = ntohl(addr->sin_addr.s_addr);
char buf[100];
sprintf(buf, "%d.%d.%d.%d",
(int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
@@ -2086,13 +2086,13 @@ PySocket_inet_aton(PyObject *self, PyObject *args)
/* Have to use inet_addr() instead */
char *ip_addr;
- long packed_addr;
+ unsigned long packed_addr;
if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) {
return NULL;
}
#ifdef USE_GUSI1
- packed_addr = (long)inet_addr(ip_addr).s_addr;
+ packed_addr = inet_addr(ip_addr).s_addr;
#else
packed_addr = inet_addr(ip_addr);
#endif