aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorDevin Nakamura <devin122@gmail.com>2011-07-11 11:20:25 -0400
committerKevin Wolf <kwolf@redhat.com>2011-07-18 16:06:27 +0200
commit5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3 (patch)
treee585c61bcb923c580021605c41eb4035a445cf6d /qemu-io.c
parent43642b3803bef28018ca7736be83f2f886d8e42c (diff)
downloadqemu-5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3.zip
qemu-5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3.tar.gz
qemu-5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3.tar.bz2
qemu-io: Fix if scoping bug
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 <devin122@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c3
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);