提交 5afc8b3d 编写于 作者: D Devin Nakamura 提交者: Kevin Wolf

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: NDevin Nakamura <devin122@gmail.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 43642b38
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册