]> Git Repo - qemu.git/blobdiff - qemu-img.c
block: Use QEMU_IS_ALIGNED
[qemu.git] / qemu-img.c
index 4ee436fc948f31c7488a6c905519a7be8132df8f..384c6f38bc6250ce3afd9acbe1392399d491d7b7 100644 (file)
@@ -2141,7 +2141,7 @@ static int img_convert(int argc, char **argv)
             int64_t sval;
 
             sval = cvtnum(optarg);
-            if (sval < 0 || sval & (BDRV_SECTOR_SIZE - 1) ||
+            if (sval < 0 || !QEMU_IS_ALIGNED(sval, BDRV_SECTOR_SIZE) ||
                 sval / BDRV_SECTOR_SIZE > MAX_BUF_SECTORS) {
                 error_report("Invalid buffer size for sparse output specified. "
                     "Valid sizes are multiples of %llu up to %llu. Select "
This page took 0.022758 seconds and 4 git commands to generate.