[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] qemu-io: Fix if scoping bug
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] qemu-io: Fix if scoping bug |
Date: |
Mon, 11 Jul 2011 10:47:39 +0100 |
On Mon, Jul 11, 2011 at 6:25 AM, Devin Nakamura <address@hidden> wrote:
> diff --git a/qemu-io.c b/qemu-io.c
> index e484f40..85cfe27 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);
Wait, this is not enough. The indentation and curlies are so broken
here :). The if (offset & 0x1ff) statement needs a closing curly.
The code should be:
if (!pflag) {
if (offset & 0x1ff) {
printf("offset %" PRId64 " is not sector aligned\n",
offset);
return 0;
}
if (count & 0x1ff) {
printf("count %d is not sector aligned\n",
count);
return 0;
}
}
Stefan
Re: [Qemu-devel] [PATCH 1/2] qemu-io: Fix formatting, Kevin Wolf, 2011/07/11