mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
nbd: fix uninitialized variable warning
Fixes:
/mnt/sdb/qemu/nbd/server.c: In function 'nbd_handle_request':
/mnt/sdb/qemu/nbd/server.c:2313:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
int ret;
Reported-by: Euler Robot <[email protected]>
Signed-off-by: Pan Nengyuan <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
This commit is contained in:
1 parent
638be47830
commit
bdf200a553
1 file changed
+1
-9
+1
-9
@@ -2384,20 +2384,12 @@ static coroutine_fn int nbd_handle_request(NBDClient *client,
|
||||
!client->export_meta.bitmap,
|
||||
NBD_META_ID_BASE_ALLOCATION,
|
||||
errp);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (client->export_meta.bitmap) {
|
||||
} else { /* client->export_meta.bitmap */
|
||||
ret = nbd_co_send_bitmap(client, request->handle,
|
||||
client->exp->export_bitmap,
|
||||
request->from, request->len,
|
||||
dont_fragment,
|
||||
true, NBD_META_ID_DIRTY_BITMAP, errp);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in new issue
Block a user