summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/rpc.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-23 20:32:32 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-23 20:32:32 +0000
commit4c09c99a68011393b654ebbfbb82c80be5afe624 (patch)
treeac02c49c920c947733e8ff29dc5a8bf671481295 /sys/lib/libsa/rpc.c
parent4c88de7dd0e551532429f98773815d7261b439e6 (diff)
strong signedness typing a version of egcs I tried months ago wanted
me to fix. I am not sure these are necessary for gas 2.8 but I figure I would commit them anyhow.
Diffstat (limited to 'sys/lib/libsa/rpc.c')
-rw-r--r--sys/lib/libsa/rpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/lib/libsa/rpc.c b/sys/lib/libsa/rpc.c
index 38c85b2b1a0..18af4b156d0 100644
--- a/sys/lib/libsa/rpc.c
+++ b/sys/lib/libsa/rpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc.c,v 1.9 1997/02/06 19:35:52 mickey Exp $ */
+/* $OpenBSD: rpc.c,v 1.10 1998/02/23 20:32:30 niklas Exp $ */
/* $NetBSD: rpc.c,v 1.16 1996/10/13 02:29:06 christos Exp $ */
/*
@@ -190,10 +190,10 @@ rpc_call(d, prog, vers, proc, sdata, slen, rdata, rlen)
if (debug)
printf("callrpc: cc=%d rlen=%d\n", cc, rlen);
#endif
- if (cc == -1)
+ if (cc < -1)
return (-1);
- if (cc <= sizeof(*reply)) {
+ if ((size_t)cc <= sizeof(*reply)) {
errno = EBADRPC;
return (-1);
}
@@ -426,7 +426,7 @@ rpc_getport(d, prog, vers)
cc = rpc_call(d, PMAPPROG, PMAPVERS, PMAPPROC_GETPORT,
args, sizeof(*args), res, sizeof(*res));
- if (cc < sizeof(*res)) {
+ if (cc < 0 || (size_t)cc < sizeof(*res)) {
printf("getport: %s", strerror(errno));
errno = EBADRPC;
return (-1);