From f50159fa9b5a0ad82e30c123643ec39a1df81d9a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 29 Jan 2014 18:05:08 +0100 Subject: block/vhdx: Error checking fixes Errors are inadvertently ignored in a few places. Has always been broken. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Jeff Cody Signed-off-by: Stefan Hajnoczi --- block/vhdx-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/vhdx-log.c') diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 8c9ae0d8e7..02755b8ded 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -965,8 +965,8 @@ static int vhdx_log_write(BlockDriverState *bs, BDRVVHDXState *s, cpu_to_le32s((uint32_t *)(buffer + 4)); /* now write to the log */ - vhdx_log_write_sectors(bs, &s->log, §ors_written, buffer, - desc_sectors + sectors); + ret = vhdx_log_write_sectors(bs, &s->log, §ors_written, buffer, + desc_sectors + sectors); if (ret < 0) { goto exit; } -- cgit v1.2.3