diff Modules/socketmodule.c @ 18753:01692bf02f97 legacy-trunk

Clean up some warnings from the SGI compiler. This is part of SF patch #434992.
author Fred Drake <fdrake@acm.org>
date Thu, 19 Jul 2001 21:16:41 +0000
parents 133e57015101
children 7cd22bf56d7b
line wrap: on
line diff
--- a/Modules/socketmodule.c	Thu Jul 19 21:11:13 2001 +0000
+++ b/Modules/socketmodule.c	Thu Jul 19 21:16:41 2001 +0000
@@ -573,7 +573,7 @@
 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 @@
 
 	/* 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