OSDN Git Service

vl: Remove useless test in configure_accelerators
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 9 Jan 2020 02:10:07 +0000 (13:10 +1100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 22 Jan 2020 00:18:24 +0000 (14:18 -1000)
The result of g_strsplit is never NULL.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
vl.c

diff --git a/vl.c b/vl.c
index 94c9301..1e5e9b9 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2783,7 +2783,7 @@ static void configure_accelerators(const char *progname)
 
         accel_list = g_strsplit(accel, ":", 0);
 
-        for (tmp = accel_list; tmp && *tmp; tmp++) {
+        for (tmp = accel_list; *tmp; tmp++) {
             /*
              * Filter invalid accelerators here, to prevent obscenities
              * such as "-machine accel=tcg,,thread=single".