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
diff --git a/fs_mgr/libfs_avb/avb_ops.cpp b/fs_mgr/libfs_avb/avb_ops.cpp
index 088749d..a119bfc 100644
--- a/fs_mgr/libfs_avb/avb_ops.cpp
+++ b/fs_mgr/libfs_avb/avb_ops.cpp
@@ -195,7 +195,7 @@
}
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;