From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj7I8-0006pI-E5 for qemu-devel@nongnu.org; Tue, 19 Jul 2011 06:12:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qj7I6-0003ND-81 for qemu-devel@nongnu.org; Tue, 19 Jul 2011 06:12:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qj7I5-0003Mu-DF for qemu-devel@nongnu.org; Tue, 19 Jul 2011 06:12:37 -0400 From: Kevin Wolf Date: Tue, 19 Jul 2011 12:15:06 +0200 Message-Id: <1311070524-13533-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1311070524-13533-1-git-send-email-kwolf@redhat.com> References: <1311070524-13533-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 03/21] qemu-io: Fix if scoping bug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Devin Nakamura Fix a bug caused by lack of braces in if statement Lack of braces means that if(count & 0x1ff) is never reached Signed-off-by: Devin Nakamura Signed-off-by: Kevin Wolf --- qemu-io.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index e3c825f..a553d0c 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -449,7 +449,7 @@ static int read_f(int argc, char **argv) return 0; } - if (!pflag) + if (!pflag) { if (offset & 0x1ff) { printf("offset %" PRId64 " is not sector aligned\n", offset); @@ -460,6 +460,7 @@ static int read_f(int argc, char **argv) count); return 0; } + } buf = qemu_io_alloc(count, 0xab); -- 1.7.6