]> granicus.if.org Git - python/commitdiff
Wipe out some warnings about non-ANSI code and an unsafe arg to
authorGuido van Rossum <guido@python.org>
Wed, 17 Jul 2002 14:33:34 +0000 (14:33 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Jul 2002 14:33:34 +0000 (14:33 +0000)
isdigit().

Modules/getaddrinfo.c

index 6731c6c1d9b0daf9d9aeaa31ad0d9dce102974fe..dc6376fa2f3bdeb4c7561db680d90bee577dd240 100644 (file)
@@ -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;