summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2003-01-27 22:45:08 +0000
committerMartin Blapp <mbr@FreeBSD.org>2003-01-27 22:45:08 +0000
commit3c788545e871d3a772f1e44da09bee33e15131ff (patch)
tree30aa3cc432ac4132526e2d0e6aa90be8dcd1b681 /lib/libc
parent33e0ae486e79ae5be3d88eee18668ac67760f0ca (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/rpc/getnetconfig.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c
index 370085028d4a..0e77419e864d 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.
*/