From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgII8-0007Fd-5k for qemu-devel@nongnu.org; Mon, 11 Jul 2011 11:21:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgII6-000337-Nj for qemu-devel@nongnu.org; Mon, 11 Jul 2011 11:20:59 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:38267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgII6-00032z-BT for qemu-devel@nongnu.org; Mon, 11 Jul 2011 11:20:58 -0400 Received: by eyb6 with SMTP id 6so1564567eyb.4 for ; Mon, 11 Jul 2011 08:20:57 -0700 (PDT) From: Devin Nakamura Date: Mon, 11 Jul 2011 11:20:25 -0400 Message-Id: <1310397625-2929-1-git-send-email-devin122@gmail.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH v3 2/2] qemu-io: Fix if scoping bug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Devin Nakamura Fix a bug caused by lack of braces in if statement Lack of braces means that if(count & 0x1ff) is never reached Conflicts: qemu-io.c Signed-off-by: Devin Nakamura --- 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.rc1