c_client.py: simplify maximum expression
Signed-off-by: Ran Benita <ran234@gmail.com> Reviewed-by: Christian Linhart <chris@demorecorder.com>
This commit is contained in:
parent
1b37d6ad3a
commit
12d23b934f
|
@ -1338,8 +1338,7 @@ def _c_serialize(context, self):
|
||||||
if not field.type.fixed_size() or self.is_switch:
|
if not field.type.fixed_size() or self.is_switch:
|
||||||
variable_size_fields += 1
|
variable_size_fields += 1
|
||||||
# determine maxtypelen
|
# determine maxtypelen
|
||||||
for p in params:
|
maxtypelen = max(len(p[0]) + len(p[1]) for p in params)
|
||||||
maxtypelen = max(maxtypelen, len(p[0]) + len(p[1]))
|
|
||||||
|
|
||||||
# write to .c/.h
|
# write to .c/.h
|
||||||
indent = ' '*(len(func_name)+2)
|
indent = ' '*(len(func_name)+2)
|
||||||
|
|
Loading…
Reference in New Issue