summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle/json_object_string_addf_prefix2str.cocci
blob: ae012b91beef1c1b54f6565ec3c845ea0e246942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@@
identifier json;
expression family, value;
expression prefix;
constant key;
@@

(
-prefix2str(prefix, value, ...);
...
-json_object_string_add(json, key, value);
+json_object_string_addf(json, key, "%pFX", prefix);
|
-json_object_string_add(json, key, prefix2str(prefix, value, ...));
+json_object_string_addf(json, key, "%pFX", prefix);
)