summaryrefslogtreecommitdiff
path: root/libc/inet/rpc/getrpcent.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-02-12 00:59:18 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-02-12 00:59:18 +0000
commit356b686774968d312476b66d0c1fb1f21c46305a (patch)
tree2f5aaf6e6add6d81e463d41609bd2f3cd5107d0a /libc/inet/rpc/getrpcent.c
parente57fc6bbb2e98f9ef3336db698dc7dd260dfc502 (diff)
Clean up lots of warnings.
Diffstat (limited to 'libc/inet/rpc/getrpcent.c')
-rw-r--r--libc/inet/rpc/getrpcent.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c
index 02f0eac78..00e67ee6b 100644
--- a/libc/inet/rpc/getrpcent.c
+++ b/libc/inet/rpc/getrpcent.c
@@ -54,9 +54,9 @@ struct rpcdata {
struct rpcent rpc;
char line[BUFSIZ + 1];
char *domain;
-} *rpcdata, *_rpcdata();
+} *rpcdata;
-static struct rpcent *interpret();
+static struct rpcent *interpret(const char *val, int len);
struct hostent *gethostent();
char *inet_ntoa();
@@ -85,14 +85,11 @@ register int number;
{
register struct rpcdata *d = _rpcdata();
register struct rpcent *p;
- int reason;
- char adrstr[16], *val = NULL;
- int vallen;
if (d == 0)
return (0);
setrpcent(0);
- while (p = getrpcent()) {
+ while ((p = getrpcent())) {
if (p->r_number == number)
break;
}
@@ -112,7 +109,7 @@ char *name;
char **rp;
setrpcent(0);
- while (rpc = getrpcent()) {
+ while ((rpc = getrpcent())) {
if (strcmp(rpc->r_name, name) == 0)
return (rpc);
for (rp = rpc->r_aliases; *rp != NULL; rp++) {
@@ -165,10 +162,6 @@ endrpcent()
struct rpcent *getrpcent()
{
- struct rpcent *hp;
- int reason;
- char *key = NULL, *val = NULL;
- int keylen, vallen;
register struct rpcdata *d = _rpcdata();
if (d == 0)
@@ -198,14 +191,14 @@ char *s;
}
#endif
-static struct rpcent *interpret(val, len)
+static struct rpcent *interpret(const char *val, int len)
{
register struct rpcdata *d = _rpcdata();
char *p;
register char *cp, **q;
if (d == 0)
- return;
+ return NULL;
strncpy(d->line, val, len);
p = d->line;
d->line[len] = '\n';