Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
5e0ea09
)
vppapigen: coverity 219549, dead code in generated file
74/34574/3
author
Ole Troan
<ot@cisco.com>
Tue, 23 Nov 2021 09:49:36 +0000
(10:49 +0100)
committer
Damjan Marion
<dmarion@me.com>
Thu, 25 Nov 2021 15:25:34 +0000
(15:25 +0000)
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I64804092917f1d8dc520549bacae81672a95cd1e
src/tools/vppapigen/vppapigen_c.py
patch
|
blob
|
history
diff --git
a/src/tools/vppapigen/vppapigen_c.py
b/src/tools/vppapigen/vppapigen_c.py
index
ae47625
..
d0f63fb
100644
(file)
--- a/
src/tools/vppapigen/vppapigen_c.py
+++ b/
src/tools/vppapigen/vppapigen_c.py
@@
-206,6
+206,8
@@
class ToJSON():
write(' cJSON *array = cJSON_CreateArray();\n')
for b in o.block:
+ if b[1] == 0:
+ continue
write(' if (a & {})\n'.format(b[0]))
write(' cJSON_AddItemToArray(array, cJSON_CreateString("{}"));\n'.format(b[0]))
write(' return array;\n')