[PATCH for-4.21?] xl: drop redundant return value check from list_domains_details()

Jan Beulich posted 1 patch 1 week, 2 days ago
Failed in applying to current master (apply log)
[PATCH for-4.21?] xl: drop redundant return value check from list_domains_details()
Posted by Jan Beulich 1 week, 2 days ago
The check that was added to address a Coverity report renderned another,
later check dead, which Coverity again complains about.

Fixes: d0193c6d6716 ("tools/xl: check return value of printf_info_one_json() in list_domains_details()")
Coverity ID: 1667251
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/xl/xl_info.c
+++ b/tools/xl/xl_info.c
@@ -593,10 +593,7 @@ static void list_domains_details(const l
         } else
             printf_info_sexp(info[i].domid, &d_config, stdout);
         libxl_domain_config_dispose(&d_config);
-#ifdef HAVE_LIBJSONC
-        if (rc)
-            goto out;
-#elif defined(HAVE_LIBYAJL)
+#ifdef HAVE_LIBYAJL
         if (s != yajl_gen_status_ok)
             goto out;
 #endif
Re: [PATCH for-4.21?] xl: drop redundant return value check from list_domains_details()
Posted by Oleksii Kurochko 1 week, 2 days ago
On 10/20/25 1:33 PM, Jan Beulich wrote:
> The check that was added to address a Coverity report renderned another,
> later check dead, which Coverity again complains about.
>
> Fixes: d0193c6d6716 ("tools/xl: check return value of printf_info_one_json() in list_domains_details()")
> Coverity ID: 1667251
> Signed-off-by: Jan Beulich<jbeulich@suse.com>

Release-Acked-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>

Thanks.

~ Oleksii

>
> --- a/tools/xl/xl_info.c
> +++ b/tools/xl/xl_info.c
> @@ -593,10 +593,7 @@ static void list_domains_details(const l
>           } else
>               printf_info_sexp(info[i].domid, &d_config, stdout);
>           libxl_domain_config_dispose(&d_config);
> -#ifdef HAVE_LIBJSONC
> -        if (rc)
> -            goto out;
> -#elif defined(HAVE_LIBYAJL)
> +#ifdef HAVE_LIBYAJL
>           if (s != yajl_gen_status_ok)
>               goto out;
>   #endif
Re: [PATCH for-4.21?] xl: drop redundant return value check from list_domains_details()
Posted by Jan Beulich 1 week, 2 days ago
On 20.10.2025 17:56, Oleksii Kurochko wrote:
> 
> On 10/20/25 1:33 PM, Jan Beulich wrote:
>> The check that was added to address a Coverity report renderned another,
>> later check dead, which Coverity again complains about.
>>
>> Fixes: d0193c6d6716 ("tools/xl: check return value of printf_info_one_json() in list_domains_details()")
>> Coverity ID: 1667251
>> Signed-off-by: Jan Beulich<jbeulich@suse.com>
> 
> Release-Acked-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>

Thanks, but we'll want to take Roger's fix (which you also did ack).

Jan