From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXLkR-0003JE-88 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 02:12:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXLkQ-0004N4-GF for qemu-devel@nongnu.org; Tue, 18 Jul 2017 02:12:43 -0400 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 18 Jul 2017 03:09:39 -0300 Message-Id: <20170718061005.29518-4-f4bug@amsat.org> In-Reply-To: <20170718061005.29518-1-f4bug@amsat.org> References: <20170718061005.29518-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 03/29] qemu-img: use QEMU_IS_ALIGNED macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org, Kevin Wolf , Max Reitz Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Eric Blake Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 182e697f81..6f5f956302 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3804,7 +3804,7 @@ static void bench_cb(void *opaque, int ret) b->in_flight--; /* Time for flush? Drain queue if requested, then flush */ - if (b->flush_interval && remaining % b->flush_interval == 0) { + if (b->flush_interval && QEMU_IS_ALIGNED(remaining, b->flush_interval)) { if (!b->in_flight || !b->drain_on_flush) { BlockCompletionFunc *cb; -- 2.13.2