From: Devin Nakamura <devin122@gmail.com>
To: qemu-devel@nongnu.org
Cc: Devin Nakamura <devin122@gmail.com>
Subject: [Qemu-devel] [PATCH v3 2/2] qemu-io: Fix if scoping bug
Date: Mon, 11 Jul 2011 11:20:25 -0400 [thread overview]
Message-ID: <1310397625-2929-1-git-send-email-devin122@gmail.com> (raw)
In-Reply-To: <CAJSP0QX0OfkV0i4M0w1pxJQ2BMfmKnYwaHY-M0LK5ZiQ0OPoQQ@mail.gmail.com>
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 <devin122@gmail.com>
---
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
next prev parent reply other threads:[~2011-07-11 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 5:25 [Qemu-devel] [PATCH 1/2] qemu-io: Fix formatting Devin Nakamura
2011-07-11 5:25 ` [Qemu-devel] [PATCH 2/2] qemu-io: Fix if scoping bug Devin Nakamura
2011-07-11 9:47 ` Stefan Hajnoczi
2011-07-11 13:18 ` Kevin Wolf
2011-07-11 13:18 ` Stefan Hajnoczi
2011-07-11 15:20 ` Devin Nakamura [this message]
2011-07-12 12:59 ` [Qemu-devel] [PATCH v3 " Kevin Wolf
2011-07-11 13:21 ` [Qemu-devel] [PATCH 1/2] qemu-io: Fix formatting Kevin Wolf
2011-07-11 15:22 ` [Qemu-devel] [PATCH v3 " Devin Nakamura
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310397625-2929-1-git-send-email-devin122@gmail.com \
--to=devin122@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.