All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpus: Fix botched configure_icount() error API violation fix
@ 2020-05-08 10:49 Markus Armbruster
  2020-05-08 13:45 ` Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Markus Armbruster @ 2020-05-08 10:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell

Fixes: abc9bf69a66a11499a801ff545b8fe7adbb3a04c
Fixes: Coverity CID 1428754
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 cpus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpus.c b/cpus.c
index 5670c96bcf..b9275c672d 100644
--- a/cpus.c
+++ b/cpus.c
@@ -813,7 +813,7 @@ void configure_icount(QemuOpts *opts, Error **errp)
         return;
     }
 
-    if (strcmp(option, "auto") != 0) {
+    if (option && !strcmp(option, "auto")) {
         if (qemu_strtol(option, NULL, 0, &time_shift) < 0
             || time_shift < 0 || time_shift > MAX_ICOUNT_SHIFT) {
             error_setg(errp, "icount: Invalid shift value");
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-25 10:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 10:49 [PATCH] cpus: Fix botched configure_icount() error API violation fix Markus Armbruster
2020-05-08 13:45 ` Eric Blake
2020-05-08 16:12   ` Philippe Mathieu-Daudé
2020-05-08 17:43 ` Markus Armbruster
2020-05-21 14:43 ` Paolo Bonzini
2020-05-25  5:44   ` Markus Armbruster
2020-05-25 10:21     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.