aboutsummaryrefslogtreecommitdiff
path: root/src/libsunrpc/rpc.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-05-04 18:02:48 +0000
committerrsc <devnull@localhost>2006-05-04 18:02:48 +0000
commit886a6f6c535f081e5d845db7ba79b16f2b68ef97 (patch)
treeb0c5dea37fda1f3b8e833b12196f2c898e775847 /src/libsunrpc/rpc.c
parente77222a4ecdf427c2eed2eb44251b8841ef81b3c (diff)
downloadplan9port-886a6f6c535f081e5d845db7ba79b16f2b68ef97.tar.gz
plan9port-886a6f6c535f081e5d845db7ba79b16f2b68ef97.tar.bz2
plan9port-886a6f6c535f081e5d845db7ba79b16f2b68ef97.zip
rpc fixes (vandebo)
Diffstat (limited to 'src/libsunrpc/rpc.c')
-rw-r--r--src/libsunrpc/rpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsunrpc/rpc.c b/src/libsunrpc/rpc.c
index 4c324429..bf042317 100644
--- a/src/libsunrpc/rpc.c
+++ b/src/libsunrpc/rpc.c
@@ -140,6 +140,7 @@ sunrpcsize(SunRpc *rpc)
case SunRpcMismatch:
case SunProgMismatch:
a += 3*4;
+ break;
default:
a += 4;
}
@@ -439,7 +440,7 @@ sunstringunpack(uchar *a, uchar *ea, uchar **pa, char **s, u32int max)
goto Err;
/* slide string down over length to make room for NUL */
memmove(dat-1, dat, n);
- dat[-1+n] = 0;
+ dat[n-1] = 0;
*s = (char*)(dat-1);
return 0;
Err: