[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/8] usb: a trivial code change for more idio
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/8] usb: a trivial code change for more idiomatic writing style |
Date: |
Fri, 1 Aug 2014 03:32:28 +0000 |
Hi,
> Subject: Re: [PATCH v2 2/8] usb: a trivial code change for more idiomatic
> writing
> style
>
> On 07/31/2014 08:32 PM, address@hidden wrote:
> > From: Gonglei <address@hidden>
> >
> > Signed-off-by: Gonglei <address@hidden>
> > ---
> > hw/usb/dev-audio.c | 2 +-
> > hw/usb/dev-mtp.c | 4 ++--
> > hw/usb/hcd-ehci.c | 2 +-
> > 3 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
> > index bfebfe9..988f6cc 100644
> > --- a/hw/usb/dev-audio.c
> > +++ b/hw/usb/dev-audio.c
> > @@ -371,7 +371,7 @@ static void output_callback(void *opaque, int avail)
> > return;
> > }
> > data = streambuf_get(&s->out.buf);
> > - if (NULL == data) {
> > + if (data == NULL) {
>
> Wouldn't it be even more idiomatic as:
>
> if (!data) {
>
> Probably applies throughout your series.
>
OK, will do. Thanks!
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
Best regards,
-Gonglei
[Qemu-devel] [PATCH v2 1/8] CODING_STYLE: Section about conditional statement, arei.gonglei, 2014/07/31
[Qemu-devel] [PATCH v2 6/8] spice: a trivial code change for more idiomatic writing style, arei.gonglei, 2014/07/31
[Qemu-devel] [PATCH v2 7/8] vl: a trivial code change for more idiomatic writing style, arei.gonglei, 2014/07/31
[Qemu-devel] [PATCH v2 5/8] a trivial code change for more idiomatic writing style, arei.gonglei, 2014/07/31
[Qemu-devel] [PATCH v2 4/8] isa-bus: a trivial code change for more idiomatic writing style, arei.gonglei, 2014/07/31
Re: [Qemu-devel] [PATCH v2 for-2.2 0/8] about Yoda conditions, Eric Blake, 2014/07/31