From 1b8f777673985af366de099ad4e41d334b36fb12 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Mon, 30 May 2022 12:39:57 +0200 Subject: block: use 'unsigned' for in_flight field on driver state This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC: Vladimir Sementsov-Ogievskiy CC: Kevin Wolf CC: Hanna Reitz CC: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/nbd.c') diff --git a/block/nbd.c b/block/nbd.c index 5849d312cc..97683cce27 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -77,7 +77,7 @@ typedef struct BDRVNBDState { QemuMutex requests_lock; NBDClientState state; CoQueue free_sema; - int in_flight; + unsigned in_flight; NBDClientRequest requests[MAX_NBD_REQUESTS]; QEMUTimer *reconnect_delay_timer; -- cgit v1.2.3