]> git.proxmox.com Git - mirror_qemu.git/blame - scripts/coccinelle/qobject.cocci
qobject: Catch another straggler for use of qdict_put_str()
[mirror_qemu.git] / scripts / coccinelle / qobject.cocci
CommitLineData
a2f3453e
EB
1// Use QDict macros where they make sense
2@@
3expression Obj, Key, E;
4@@
a92c2159 5(
a2f3453e
EB
6- qdict_put_obj(Obj, Key, QOBJECT(E));
7+ qdict_put(Obj, Key, E);
a92c2159 8|
01b2ffce 9- qdict_put(Obj, Key, qnum_from_int(E));
a92c2159
EB
10+ qdict_put_int(Obj, Key, E);
11|
12- qdict_put(Obj, Key, qbool_from_bool(E));
13+ qdict_put_bool(Obj, Key, E);
14|
15- qdict_put(Obj, Key, qstring_from_str(E));
16+ qdict_put_str(Obj, Key, E);
17)
a2f3453e
EB
18
19// Use QList macros where they make sense
20@@
21expression Obj, E;
22@@
a92c2159 23(
a2f3453e
EB
24- qlist_append_obj(Obj, QOBJECT(E));
25+ qlist_append(Obj, E);
a92c2159 26|
01b2ffce 27- qlist_append(Obj, qnum_from_int(E));
a92c2159
EB
28+ qlist_append_int(Obj, E);
29|
30- qlist_append(Obj, qbool_from_bool(E));
31+ qlist_append_bool(Obj, E);
32|
33- qlist_append(Obj, qstring_from_str(E));
34+ qlist_append_str(Obj, E);
35)