qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 2/9] numa: split out NumaOptions parsing into


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 2/9] numa: split out NumaOptions parsing into parse_NumaOptions()
Date: Mon, 26 Mar 2018 09:33:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/26/2018 03:38 AM, Laurent Vivier wrote:

   end:
+    if (err) {
+        error_propagate(errp, err);
+    }

"if (err)" is not necessary here.  See
scripts/coccinelle/error_propagate_null.cocci.


+    parse_NumaOptions(ms, object, &err);
+
+end:
       qapi_free_NumaOptions(object);
       if (err) {
           error_report_err(err);

We can fix this one too while at it.

Hmm - this is the same script mentioned here:
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06293.html

Except that patch didn't pick up this file.  Why is Coccinelle not
seeing this?


The script only catch error_propagate(), not error_report_err(). And
error_report_err() doesn't check if err is NULL.

Aha - chalk it up to reviewing late in the day; I saw an 'if (err)' but didn't pay close attention to what was being guarded in the two different conditionals.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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