On 5/8/20 5:49 AM, Markus Armbruster wrote:
Fixes: abc9bf69a66a11499a801ff545b8fe7adbb3a04c
Fixes: Coverity CID 1428754
Signed-off-by: Markus Armbruster <address@hidden>
---
cpus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
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")) {
Another alternative would be using g_strcmp0, but this form is fine.