[libvirt PATCH 15/39] cpu_x86: Use g_auto* in x86Compute

Ján Tomko jtomko at redhat.com
Tue Apr 7 10:08:37 UTC 2020


On a Friday in 2020, Jiri Denemark wrote:
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
> src/cpu/cpu_x86.c | 64 ++++++++++++++++++-----------------------------
> 1 file changed, 24 insertions(+), 40 deletions(-)
>
>diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
>index 6c3f9fc0be..6758fcc170 100644
>--- a/src/cpu/cpu_x86.c
>+++ b/src/cpu/cpu_x86.c
>@@ -1689,13 +1689,12 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt)

The comment of this macro says:
   * RET: return code to set

but there has been no RET parameter since the introduction of this
comment in a2ba53cf18a9ad252a74a39f45ec3577923f50de

>             char *flagsStr = NULL; \
>             if (!(flagsStr = x86FeatureNames(map, ", ", (CPU_DEF)))) { \
>                 virReportOOMError(); \
>-                goto error; \
>+                return VIR_CPU_COMPARE_ERROR; \
>             } \
>             if (message) \
>                 *message = g_strdup_printf("%s: %s", _(MSG), flagsStr); \
>             VIR_DEBUG("%s: %s", MSG, flagsStr); \
>             VIR_FREE(flagsStr); \
>-            ret = VIR_CPU_COMPARE_INCOMPATIBLE; \
>         } while (0)
>
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200407/9b7f8356/attachment-0001.sig>


More information about the libvir-list mailing list