From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: arei.gonglei@huawei.com
Cc: peter.maydell@linaro.org, weidong.huang@huawei.com,
stefanha@redhat.com, mst@redhat.com, marcel.a@redhat.com,
luonengjun@huawei.com, qemu-devel@nongnu.org, armbru@redhat.com,
av1474@comtv.ru, kraxel@redhat.com, aliguori@amazon.com,
imammedo@redhat.com, dmitry@daynix.com, pbonzini@redhat.com,
peter.huangpeng@huawei.com, lcapitulino@redhat.com,
afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 4/7] a trivial code change for more idiomatic writing style
Date: Thu, 31 Jul 2014 14:55:02 +0100 [thread overview]
Message-ID: <20140731135501.GH2405@work-vm> (raw)
In-Reply-To: <1406809740-10836-5-git-send-email-arei.gonglei@huawei.com>
* arei.gonglei@huawei.com (arei.gonglei@huawei.com) wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> qdev-monitor.c | 2 +-
> qemu-char.c | 2 +-
> util/qemu-sockets.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qdev-monitor.c b/qdev-monitor.c
> index f87f3d8..3e30d38 100644
> --- a/qdev-monitor.c
> +++ b/qdev-monitor.c
> @@ -694,7 +694,7 @@ void qmp_device_del(const char *id, Error **errp)
> DeviceState *dev;
>
> dev = qdev_find_recursive(sysbus_get_default(), id);
> - if (NULL == dev) {
> + if (dev == NULL) {
I know people who write it as 'NULL == dev' on purpose,
because that will cause an error if you accidentally type a single =
where as 'dev = NULL' will just cause confusion.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2014-07-31 13:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 12:28 [Qemu-devel] [PATCH for-2.2 0/7] a trivial code change for more idiomatic writing style arei.gonglei
2014-07-31 12:28 ` [Qemu-devel] [PATCH 1/7] usb: " arei.gonglei
2014-07-31 12:28 ` [Qemu-devel] [PATCH 2/7] audio: " arei.gonglei
2014-07-31 12:28 ` [Qemu-devel] [PATCH 3/7] isa-bus: " arei.gonglei
2014-07-31 12:28 ` [Qemu-devel] [PATCH 4/7] " arei.gonglei
2014-07-31 13:55 ` Dr. David Alan Gilbert [this message]
2014-07-31 13:59 ` Peter Maydell
2014-07-31 14:49 ` Dr. David Alan Gilbert
2014-07-31 12:28 ` [Qemu-devel] [PATCH 5/7] spice: " arei.gonglei
2014-07-31 12:28 ` [Qemu-devel] [PATCH 6/7] vl: " arei.gonglei
2014-07-31 12:29 ` [Qemu-devel] [PATCH 7/7] vmxnet3: " arei.gonglei
2014-08-04 11:08 ` Stefan Hajnoczi
2014-07-31 12:39 ` [Qemu-devel] [PATCH for-2.2 0/7] " Peter Maydell
2014-07-31 12:46 ` Gonglei (Arei)
2014-07-31 12:55 ` Peter Crosthwaite
2014-07-31 13:04 ` Gonglei (Arei)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140731135501.GH2405@work-vm \
--to=dgilbert@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=av1474@comtv.ru \
--cc=dmitry@daynix.com \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=luonengjun@huawei.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=weidong.huang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.