From patchwork Tue Jul 19 10:15:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/21] qemu-io: Fix if scoping bug Date: Tue, 19 Jul 2011 00:15:06 -0000 From: Kevin Wolf X-Patchwork-Id: 105428 Message-Id: <1311070524-13533-4-git-send-email-kwolf@redhat.com> 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);