diff options
author | Ole Troan <ot@cisco.com> | 2021-11-23 10:49:36 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-11-25 15:25:34 +0000 |
commit | 4551715aaa647e5e565d81bd19fded8cacd8f778 (patch) | |
tree | 01ef98627f0003c6ba0e3b11fb2e0234d77a99e4 /src/tools/vppapigen/vppapigen_c.py | |
parent | 5e0ea09d96010e99a7ce0d2f3370f0de50c46c83 (diff) |
vppapigen: coverity 219549, dead code in generated file
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I64804092917f1d8dc520549bacae81672a95cd1e
Diffstat (limited to 'src/tools/vppapigen/vppapigen_c.py')
-rw-r--r-- | src/tools/vppapigen/vppapigen_c.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py index ae47625a474..d0f63fbdb0c 100644 --- 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') |