qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/13] qapi: Clean up superfluous null check in


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 12/13] qapi: Clean up superfluous null check in qapi_dealloc_type_str()
Date: Mon, 10 Feb 2014 08:27:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/10/2014 07:20 AM, Markus Armbruster wrote:
> Argument can't be null.  No other Visitor method type_str() checks for
> null.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  qapi/qapi-dealloc-visitor.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
> index dc53545..d0ea118 100644
> --- a/qapi/qapi-dealloc-visitor.c
> +++ b/qapi/qapi-dealloc-visitor.c
> @@ -131,9 +131,7 @@ static void qapi_dealloc_end_list(Visitor *v, Error 
> **errp)
>  static void qapi_dealloc_type_str(Visitor *v, char **obj, const char *name,
>                                    Error **errp)
>  {
> -    if (obj) {
> -        g_free(*obj);
> -    }
> +    g_free(*obj);
>  }
>  
>  static void qapi_dealloc_type_int(Visitor *v, int64_t *obj, const char *name,
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]