Skip to content

Commit 2335100

Browse files
committed
Wipe out some warnings about non-ANSI code and an unsafe arg to
isdigit().
1 parent 2095b96 commit 2335100

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

Modules/getaddrinfo.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,15 @@ if (pai->ai_flags & AI_CANONNAME) {\
199199
#define ERR(err) { error = (err); goto bad; }
200200

201201
char *
202-
gai_strerror(ecode)
203-
int ecode;
202+
gai_strerror(int ecode)
204203
{
205204
if (ecode < 0 || ecode > EAI_MAX)
206205
ecode = EAI_MAX;
207206
return ai_errlist[ecode];
208207
}
209208

210209
void
211-
freeaddrinfo(ai)
212-
struct addrinfo *ai;
210+
freeaddrinfo(struct addrinfo *ai)
213211
{
214212
struct addrinfo *next;
215213

@@ -223,10 +221,9 @@ freeaddrinfo(ai)
223221
}
224222

225223
static int
226-
str_isnumber(p)
227-
const char *p;
224+
str_isnumber(const char *p)
228225
{
229-
char *q = (char *)p;
226+
unsigned char *q = (unsigned char *)p;
230227
while (*q) {
231228
if (! isdigit(*q))
232229
return NO;

0 commit comments

Comments
 (0)