diff options
author | rsc <devnull@localhost> | 2004-03-05 05:53:11 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-03-05 05:53:11 +0000 |
commit | 15680d56a6c6e15921d958aa6006825c2cd20bf8 (patch) | |
tree | 84abb4cb8d761fb49d688b3eebcf17e47f05372a /src/libfs | |
parent | 230d62c4756ece47951e96a7cb1b5b72cf6a3844 (diff) | |
download | plan9port-15680d56a6c6e15921d958aa6006825c2cd20bf8.tar.gz plan9port-15680d56a6c6e15921d958aa6006825c2cd20bf8.tar.bz2 plan9port-15680d56a6c6e15921d958aa6006825c2cd20bf8.zip |
Amazingly picky bug fixes from Valgrind.
Diffstat (limited to 'src/libfs')
-rw-r--r-- | src/libfs/read.c | 3 | ||||
-rw-r--r-- | src/libfs/write.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libfs/read.c b/src/libfs/read.c index 7cd4fd14..9765602c 100644 --- a/src/libfs/read.c +++ b/src/libfs/read.c @@ -28,7 +28,8 @@ fprint(2, "n %d msize %d\n", n, msize); tx.offset = offset; tx.count = n; - fsrpc(fid->fs, &tx, &rx, &freep); + if(fsrpc(fid->fs, &tx, &rx, &freep) < 0) + return -1; if(rx.type == Rerror){ werrstr("%s", rx.ename); free(freep); diff --git a/src/libfs/write.c b/src/libfs/write.c index bae2083e..5da27d12 100644 --- a/src/libfs/write.c +++ b/src/libfs/write.c @@ -24,7 +24,8 @@ _fspwrite(Fid *fid, void *buf, long n, vlong offset) tx.count = n; tx.data = buf; - fsrpc(fid->fs, &tx, &rx, &freep); + if(fsrpc(fid->fs, &tx, &rx, &freep) < 0) + return -1; if(rx.type == Rerror){ werrstr("%s", rx.ename); free(freep); |