hmp: Fix warning from smatch (wrong argument in function call)
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]>
Signed-off-by Stefan Weil <[email protected]>
--- hmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hmp.c +1 -1
@@ -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
Quoted 7 lines · Stefan Weil
Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer
qmp_query_blockexpects a pointer argument, so passing false is wrong.Cc Luiz Capitulino <[email protected]>Signed-off-by Stefan Weil <[email protected]>
Reviewed-by Markus Armbruster <[email protected]>
Michael Tokarev
AppliedQuoted 4 lines · Stefan Weil
Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer
qmp_query_blockexpects a pointer argument, so passing false is wrong.
Applied to -trivial. It turns out zero and zero are different! :)
Thanks,
/mjt