Commit ca8bfcc4 authored by Rusty Russell's avatar Rusty Russell

ptr_valid: fix warn-unused-result warning (-O2)

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 0ce52c7c
......@@ -246,9 +246,14 @@ static bool check_with_child(struct ptr_valid_batch *batch,
return false;
}
write(batch->to_child, &p, sizeof(p));
write(batch->to_child, &size, sizeof(size));
write(batch->to_child, &is_write, sizeof(is_write));
if (write(batch->to_child, &p, sizeof(p))
+ write(batch->to_child, &size, sizeof(size))
+ write(batch->to_child, &is_write, sizeof(is_write))
!= sizeof(p) + sizeof(size) + sizeof(is_write)) {
finish_child(batch);
errno = EFAULT;
return false;
}
if (read(batch->from_child, &ret, sizeof(ret)) != sizeof(ret)) {
finish_child(batch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment