Fix valgrind warning
authorNikolaus Rath <Nikolaus@rath.org>
Sun, 9 Oct 2016 21:04:00 +0000 (14:04 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Sun, 9 Oct 2016 21:11:26 +0000 (14:11 -0700)
If we don't assign a value to padding, we get a warning about reading
uninitialized data when sending the iovec to the kernel.

lib/fuse_lowlevel.c

index 4ad5daf9f1d689ae3d81f13d09de4579c1fdc5f3..8d4ad36b52d4e5174ca21340f8bb4cfb6dd1378a 100644 (file)
@@ -2279,6 +2279,7 @@ int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino,
        outarg.nodeid = ino;
        outarg.offset = offset;
        outarg.size = size;
+       outarg.padding = 0;
 
        iov[1].iov_base = &outarg;
        iov[1].iov_len = sizeof(outarg);