summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-05 23:43:35 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-05 23:43:35 (GMT)
commita376cc5cc86c62f912886c4002ed1a9b3b213b88 (patch)
treed505b439cc8f6aac1ba75374b6652857273274c0 /Modules/socketmodule.c
parent60fca2c90fe4d00715f4ae28d68560e67955ab9b (diff)
downloadcpython-a376cc5cc86c62f912886c4002ed1a9b3b213b88.zip
cpython-a376cc5cc86c62f912886c4002ed1a9b3b213b88.tar.gz
cpython-a376cc5cc86c62f912886c4002ed1a9b3b213b88.tar.bz2
Keep gcc -Wall happy.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index b31ea04..3e510fe 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -85,6 +85,10 @@ Socket methods:
#include "Python.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include "mytime.h"
@@ -259,6 +263,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret)
int errnop;
#endif /* HAVE_GETHOSTBYNAME_R */
+ memset((void *) addr_ret, '\0', sizeof(*addr_ret));
if (name[0] == '\0') {
addr_ret->sin_addr.s_addr = INADDR_ANY;
return 4;