summaryrefslogtreecommitdiff
path: root/scripts/coccinelle
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-08-25 12:59:00 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-09-04 13:09:11 +0200
commit0f9afc2a8b5e78e511d79c936aa7b36deb3508bf (patch)
treeca98409a171575df4751a47a4f1da2e8fbdbbbce /scripts/coccinelle
parentf90cb2846a0b167d47131ba4600dcc816bccb1c6 (diff)
downloadqemu-0f9afc2a8b5e78e511d79c936aa7b36deb3508bf.zip
qdict: Add qdict_put_null() helper, and put it to use
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170825105913.4060-2-marcandre.lureau@redhat.com> [Update to qobject.cocci squashed in, commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r--scripts/coccinelle/qobject.cocci3
1 files changed, 3 insertions, 0 deletions
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