* arei.gong...@huawei.com (arei.gong...@huawei.com) wrote:
> From: Gonglei <arei.gong...@huawei.com>
> 
> Signed-off-by: Gonglei <arei.gong...@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 / dgilb...@redhat.com / Manchester, UK

Reply via email to