[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: braces [was Re: [Qemu-devel] [PATCH 03/19] Remove double error messa
From: |
Amit Shah |
Subject: |
Re: braces [was Re: [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set()] |
Date: |
Fri, 11 Sep 2009 11:20:51 +0530 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On (Thu) Sep 10 2009 [19:36:09], Mark McLoughlin wrote:
> On Thu, 2009-09-10 at 21:03 +0300, Michael S. Tsirkin wrote:
> > On Thu, Sep 10, 2009 at 04:18:45PM +0100, Mark McLoughlin wrote:
> > > qemu_opt_set() prints an error message in all failure cases, so
> > > qemu_set_option() doesn't need to print another error.
> > >
> > > Signed-off-by: Mark McLoughlin <address@hidden>
> >
> > Same comment about {} here
>
> That's 3 of these you and Juan have found. And, genuinely, I try not to
> do this. Just shows how much of reflex it is.
>
> IMHO,
>
> if (blaa(foo, bar, doodah) == NULL)
> return -1;
>
> is far nicer than:
>
> if (blaa(foo, bar, doodah) == NULL) {
> return -1;
> }
BTW in patch 1 of the series you convert
if (foo == NULL)
to
if (!foo)
so maybe you'd want to be consistent in the rest of the series as well?
Amit
- [Qemu-devel] [PATCH 02/19] Remove bogus error message from qemu_opts_set(), (continued)
- [Qemu-devel] [PATCH 08/19] Add qemu_net_opts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 05/19] Make qemu_opts_parse() handle empty strings, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 18/19] Port PCI NIC hotplug to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 12/19] Port -net socket to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 10/19] Port -net user to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 09/19] Port -net none and -net nic to QemuOpts, Mark McLoughlin, 2009/09/10