Commit 2335100b authored by Guido van Rossum's avatar Guido van Rossum

Wipe out some warnings about non-ANSI code and an unsafe arg to

isdigit().
parent 2095b969
...@@ -199,8 +199,7 @@ if (pai->ai_flags & AI_CANONNAME) {\ ...@@ -199,8 +199,7 @@ if (pai->ai_flags & AI_CANONNAME) {\
#define ERR(err) { error = (err); goto bad; } #define ERR(err) { error = (err); goto bad; }
char * char *
gai_strerror(ecode) gai_strerror(int ecode)
int ecode;
{ {
if (ecode < 0 || ecode > EAI_MAX) if (ecode < 0 || ecode > EAI_MAX)
ecode = EAI_MAX; ecode = EAI_MAX;
...@@ -208,8 +207,7 @@ gai_strerror(ecode) ...@@ -208,8 +207,7 @@ gai_strerror(ecode)
} }
void void
freeaddrinfo(ai) freeaddrinfo(struct addrinfo *ai)
struct addrinfo *ai;
{ {
struct addrinfo *next; struct addrinfo *next;
...@@ -223,10 +221,9 @@ freeaddrinfo(ai) ...@@ -223,10 +221,9 @@ freeaddrinfo(ai)
} }
static int static int
str_isnumber(p) str_isnumber(const char *p)
const char *p;
{ {
char *q = (char *)p; unsigned char *q = (unsigned char *)p;
while (*q) { while (*q) {
if (! isdigit(*q)) if (! isdigit(*q))
return NO; return NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment