diff --git a/qemu-img.c b/qemu-img.c index 49d914c9c4f7ca8fe4a0a0a7bdf4282bc3cabdd8..ca202e2b6fd18e237913a5376b357585d6956432 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4601,7 +4601,7 @@ static int img_bench(int argc, char **argv) { unsigned long res; - if (qemu_strtoul(optarg, NULL, 0, &res) < 0 || res > INT_MAX) { + if (qemu_strtoul(optarg, NULL, 0, &res) <= 0 || res > INT_MAX) { error_report("Invalid queue depth specified"); return 1; }