Set output value in error case

We want to set the contents of "out_size_num_byte", and not
the pointer value, in the error case.

Bug: 266757931
Change-Id: I02edddcbcc4fc80dbb61efe8dc7c45bd3ce1c904
Test: TreeHugger
This commit is contained in:
Greg Kaiser 2023-02-02 00:05:17 +00:00
parent 7cf627bac9
commit 451dfee3c7

View file

@ -195,7 +195,7 @@ AvbIOResult FsManagerAvbOps::GetSizeOfPartition(const char* partition,
}
int err = ioctl(fd, BLKGETSIZE64, out_size_num_byte);
if (err) {
out_size_num_byte = 0;
*out_size_num_byte = 0;
return AVB_IO_RESULT_ERROR_IO;
}
return AVB_IO_RESULT_OK;