aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-07-17 14:33:34 +0000
committerGuido van Rossum <guido@python.org>2002-07-17 14:33:34 +0000
commit2335100b6a32bb7beb40c7f6dfcbc69780ef274f (patch)
tree43e61abce81f45bda32254249dfd04a37f58b0c6 /Modules/getaddrinfo.c
parentreduce(): Clarified what is returned in the case of a sequence 1 item long and (diff)
downloadcpython-2335100b6a32bb7beb40c7f6dfcbc69780ef274f.tar.gz
cpython-2335100b6a32bb7beb40c7f6dfcbc69780ef274f.tar.bz2
cpython-2335100b6a32bb7beb40c7f6dfcbc69780ef274f.zip
Wipe out some warnings about non-ANSI code and an unsafe arg to
isdigit().
Diffstat (limited to 'Modules/getaddrinfo.c')
-rw-r--r--Modules/getaddrinfo.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
index 6731c6c1d9b..dc6376fa2f3 100644
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -199,8 +199,7 @@ if (pai->ai_flags & AI_CANONNAME) {\
#define ERR(err) { error = (err); goto bad; }
char *
-gai_strerror(ecode)
- int ecode;
+gai_strerror(int ecode)
{
if (ecode < 0 || ecode > EAI_MAX)
ecode = EAI_MAX;
@@ -208,8 +207,7 @@ gai_strerror(ecode)
}
void
-freeaddrinfo(ai)
- struct addrinfo *ai;
+freeaddrinfo(struct addrinfo *ai)
{
struct addrinfo *next;
@@ -223,10 +221,9 @@ freeaddrinfo(ai)
}
static int
-str_isnumber(p)
- const char *p;
+str_isnumber(const char *p)
{
- char *q = (char *)p;
+ unsigned char *q = (unsigned char *)p;
while (*q) {
if (! isdigit(*q))
return NO;