summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMark Nelson <manelso2@cisco.com>2020-03-04 15:32:09 -0500
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 08:12:25 +0000
commit3f8c381bfc469bfb252abaad851f83ffbd082b96 (patch)
tree238e87d6da5c3c97f78d8caa940b1ede2d40405c /src/tools
parentea8852991fe094c28363770acedde89af9fb5ff2 (diff)
vppapigen: crc is a negative value for some messages when using python 2.7
Type: fix Signed-off-by: Mark Nelson <manelso2@cisco.com> Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271 (cherry picked from commit ea2abbaeaf34a4652e970fd1e2f60c0d377ebde4)
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index e6a0bdc7f19..1744a32c33f 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -693,7 +693,7 @@ class VPPAPI(object):
for o in objs:
tname = o.__class__.__name__
try:
- crc = binascii.crc32(o.crc, crc)
+ crc = binascii.crc32(o.crc, crc) & 0xffffffff
except AttributeError:
pass
if isinstance(o, Define):
@@ -838,7 +838,7 @@ def foldup_blocks(block, crc):
def foldup_crcs(s):
for f in s:
f.crc = foldup_blocks(f.block,
- binascii.crc32(f.crc))
+ binascii.crc32(f.crc) & 0xffffffff)
#