Skip to contentSkip to conversation

hmp: Fix warning from smatch (wrong argument in function call)

PATCH Applied Stefan Weil 3 participants 3 messages Feb 8, 2015 – Feb 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hmp: Fix warning from smatch (wrong argument in function call)

Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer

qmp_query_block expects a pointer argument, so passing false is wrong.

Cc Luiz Capitulino <[email protected]>
---
 hmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hmp.c +1 -1
index a42c5c0..6926960 100644
@@ -411,7 +411,7 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
 
     /* Print BlockBackend information */
     if (!nodes) {
-        block_list = qmp_query_block(false);
+        block_list = qmp_query_block(NULL);
     } else {
         block_list = NULL;
     }
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Stefan Weil
Quoted 4 lines · Stefan Weil

Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer

qmp_query_block expects a pointer argument, so passing false is wrong.

Applied to -trivial. It turns out zero and zero are different! :)

Thanks,

/mjt