Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e506529

Browse files
committed
Clean up some warnings from the SGI compiler.
This is part of SF patch #434992.
1 parent 6a16ea0 commit e506529

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/socketmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ setipaddr(char* name, struct sockaddr_in * addr_ret)
573573
static PyObject *
574574
makeipaddr(struct sockaddr_in *addr)
575575
{
576-
long x = ntohl(addr->sin_addr.s_addr);
576+
unsigned long x = ntohl(addr->sin_addr.s_addr);
577577
char buf[100];
578578
sprintf(buf, "%d.%d.%d.%d",
579579
(int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
@@ -2086,13 +2086,13 @@ PySocket_inet_aton(PyObject *self, PyObject *args)
20862086

20872087
/* Have to use inet_addr() instead */
20882088
char *ip_addr;
2089-
long packed_addr;
2089+
unsigned long packed_addr;
20902090

20912091
if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) {
20922092
return NULL;
20932093
}
20942094
#ifdef USE_GUSI1
2095-
packed_addr = (long)inet_addr(ip_addr).s_addr;
2095+
packed_addr = inet_addr(ip_addr).s_addr;
20962096
#else
20972097
packed_addr = inet_addr(ip_addr);
20982098
#endif

0 commit comments

Comments
 (0)