diff options
author | mbr <mbr@FreeBSD.org> | 2003-01-27 22:45:08 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-01-27 22:45:08 +0000 |
commit | 8273c63b654cbd70a6e1e5c8d3f41fcc9f99c87b (patch) | |
tree | 30aa3cc432ac4132526e2d0e6aa90be8dcd1b681 /lib/libc/rpc/getnetconfig.c | |
parent | 5bcca953bed3e570c0918da5419b4bc5e8856bcf (diff) | |
download | FreeBSD-src-8273c63b654cbd70a6e1e5c8d3f41fcc9f99c87b.zip FreeBSD-src-8273c63b654cbd70a6e1e5c8d3f41fcc9f99c87b.tar.gz |
Fix signed/unsigned comparison warnings. Fix spelling error in
comment.
NetBSD Rev. 1.9 and 1.7
Reviewed by: phk
Obtained from: NetBSD
Diffstat (limited to 'lib/libc/rpc/getnetconfig.c')
-rw-r--r-- | lib/libc/rpc/getnetconfig.c | 9 |
1 files 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 <stdio.h> #include <errno.h> #include <netconfig.h> +#include <stddef.h> #include <stdlib.h> #include <string.h> #include <rpc/rpc.h> @@ -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. */ |