Markus Armbruster <arm...@redhat.com> writes: > Eric Blake <ebl...@redhat.com> writes: > >> On 08/25/2017 05:59 AM, Marc-André Lureau wrote: >>> A step towards completeness. >>> >>> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> >>> Reviewed-by: Markus Armbruster <arm...@redhat.com> >>> --- >>> include/qapi/qmp/qdict.h | 4 +++- >>> target/i386/cpu.c | 4 ++-- >>> 2 files changed, 5 insertions(+), 3 deletions(-) >> >> Is it worth touching up scripts/coccinelle/qobject.cocci at the same time? > > Let's keep it up-to-date. I can do it when I apply.
Squashing in the appended patch. I verified it produces exactly the change to target/i386/cpu.c Marc-André did manually, and no others. diff --git a/scripts/coccinelle/qobject.cocci b/scripts/coccinelle/qobject.cocci index c518caf7b1..1120eb1a42 100644 --- a/scripts/coccinelle/qobject.cocci +++ b/scripts/coccinelle/qobject.cocci @@ -20,6 +20,9 @@ expression Obj, Key, E; | - qdict_put(Obj, Key, qstring_from_str(E)); + qdict_put_str(Obj, Key, E); +| +- qdict_put(Obj, Key, qnull()); ++ qdict_put_null(Obj, Key); ) // Use QList macros where they make sense