From 8273c63b654cbd70a6e1e5c8d3f41fcc9f99c87b Mon Sep 17 00:00:00 2001 From: mbr Date: Mon, 27 Jan 2003 22:45:08 +0000 Subject: Fix signed/unsigned comparison warnings. Fix spelling error in comment. NetBSD Rev. 1.9 and 1.7 Reviewed by: phk Obtained from: NetBSD --- lib/libc/rpc/getnetconfig.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c index 3700850..0e77419 100644 --- a/lib/libc/rpc/getnetconfig.c +++ b/lib/libc/rpc/getnetconfig.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -461,7 +462,7 @@ getnetconfigent(netid) return (NULL); } do { - int len; + ptrdiff_t len; char *tmpp; /* tmp string pointer */ do { @@ -476,7 +477,7 @@ getnetconfigent(netid) nc_error = NC_BADFILE; break; } - if (strlen(netid) == (len = tmpp - stringp) && /* a match */ + if (strlen(netid) == (size_t) (len = tmpp - stringp) && /* a match */ strncmp(stringp, netid, (size_t)len) == 0) { if ((ncp = (struct netconfig *) malloc(sizeof (struct netconfig))) == NULL) { @@ -663,7 +664,7 @@ struct netconfig *ncp; { struct netconfig *p; char *tmp; - int i; + u_int i; if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL) return(NULL); @@ -676,7 +677,7 @@ struct netconfig *ncp; * adjust some of the member pointer to a pre-allocated buffer where * contains part of the data. * To follow the convention used in parse_ncp(), we store all the - * neccessary information in the pre-allocated buffer and let each + * necessary information in the pre-allocated buffer and let each * of the netconfig char pointer member point to the right address * in the buffer. */ -- cgit v1.1