mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-23 20:24:17 +08:00
buffer.c: correct return value when buf is NULL
In commitd614415a
("buffer.c: check whether buf is NULL in fuse_bufvec_advance func"), if fuse_bufvec_current func returns NULL, it returns 1 directly. Actually, we should return 0 when buf is NULL. Fixes:d614415a
("buffer.c: check whether buf is NULL in fuse_bufvec_advance func") Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Haotian Li <lihaotian9@huawei.com>
This commit is contained in:
parent
71f0d7c366
commit
f604536b08
@ -267,7 +267,7 @@ static int fuse_bufvec_advance(struct fuse_bufvec *bufv, size_t len)
|
||||
const struct fuse_buf *buf = fuse_bufvec_current(bufv);
|
||||
|
||||
if (!buf)
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
bufv->off += len;
|
||||
assert(bufv->off <= buf->size);
|
||||
|
Loading…
Reference in New Issue
Block a user