diff options
author | 1998-02-23 20:32:18 +0000 | |
---|---|---|
committer | 1998-02-23 20:32:18 +0000 | |
commit | bfcf73bf8f916114e53d693bd6d3de3ea3efa80f (patch) | |
tree | 32a55c26c8074d64b2d817a358517b20007e1f35 /sys/lib/libsa/rpc.c | |
parent | KNF (diff) | |
download | wireguard-openbsd-bfcf73bf8f916114e53d693bd6d3de3ea3efa80f.tar.xz wireguard-openbsd-bfcf73bf8f916114e53d693bd6d3de3ea3efa80f.zip |
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.c | 8 |
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); |