summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-27 17:22:00 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-27 17:22:00 (GMT)
commitd15b73353f17ca9ad43c50a6bd4cbce4dd04198e (patch)
tree839bcd87c9887ddbd498bfdcfe73e083938764ac /Modules
parente3d7045e478619931aec5a0dca55bffcff22354f (diff)
downloadcpython-d15b73353f17ca9ad43c50a6bd4cbce4dd04198e.zip
cpython-d15b73353f17ca9ad43c50a6bd4cbce4dd04198e.tar.gz
cpython-d15b73353f17ca9ad43c50a6bd4cbce4dd04198e.tar.bz2
Lint fixes.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 13644fe..9e305fc 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -375,6 +375,8 @@ sock_avail(s, args)
struct timeval timeout;
fd_set readers;
int n;
+ if (!getnoarg(args))
+ return NULL;
timeout.tv_sec = 0;
timeout.tv_usec = 0;
FD_ZERO(&readers);
@@ -529,7 +531,8 @@ sock_recvfrom(s, args)
return socket_error();
if (resizestring(&buf, n) < 0)
return NULL;
- return makepair(buf, makesockaddr(addrbuf, addrlen));
+ return makepair(buf,
+ makesockaddr((struct sockaddr *)addrbuf, addrlen));
}
@@ -677,7 +680,7 @@ socket_gethostname(self, args)
char buf[1024];
if (!getnoarg(args))
return NULL;
- if (gethostname(buf, sizeof buf - 1) < 0)
+ if (gethostname(buf, (int) sizeof buf - 1) < 0)
return socket_error();
buf[sizeof buf - 1] = '\0';
return newstringobject(buf);
@@ -691,7 +694,6 @@ socket_gethostbyname(self, args)
object *args;
{
object *name;
- struct hostent *hp;
struct sockaddr_in addrbuf;
if (!getStrarg(args, &name))
return NULL;