buffer.c: correct return value when buf is NULL
authorZhiqiang Liu <liuzhiqiang26@huawei.com>
Wed, 11 Nov 2020 02:00:23 +0000 (10:00 +0800)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 11 Nov 2020 09:32:56 +0000 (09:32 +0000)
commitf604536b08584bd7c979eed438f0c46ddd1871f0
tree99604c57840c4edc5af95c2b88f819f2a32e50e4
parent71f0d7c366ee2ac2d6158c7c7ea6c3c2240ebc65
buffer.c: correct return value when buf is NULL

In commit d614415a ("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>
lib/buffer.c