Skip to contentSkip to conversation

xl: drop redundant return value check from list_domains_details()

PATCH In review Jan Beulich 2 participants 3 messages Oct 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: drop redundant return value check from list_domains_details()

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

tools/xl/xl_info.c +1 -4
@@ -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
#1 lore raw
Quoted 6 lines · Jan Beulich

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

Thanks.

~ Oleksii

Quoted 15 lines
tools/xl/xl_info.c +1 -4
@@ -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
#2 lore raw
Quoted 10 lines · Oleksii Kurochko
Quoted 6 lines · Jan Beulich

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

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

Jan