aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/vppapigen/vppapigen_c.py')
-rw-r--r--src/tools/vppapigen/vppapigen_c.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py
index a893b3a89bc..46f60dea843 100644
--- a/src/tools/vppapigen/vppapigen_c.py
+++ b/src/tools/vppapigen/vppapigen_c.py
@@ -136,10 +136,9 @@ class Printfun():
if o.modern_vla:
write(' if (vl_api_string_len(&a->{f}) > 0) {{\n'
.format(f=o.fieldname))
- write(' s = format(s, "\\n%U{f}: %.*s", '
+ write(' s = format(s, "\\n%U{f}: %U", '
'format_white_space, indent, '
- 'vl_api_string_len(&a->{f}) - 1, '
- 'vl_api_from_api_string(&a->{f}));\n'.format(f=o.fieldname))
+ 'vl_api_format_string, (&a->{f}));\n'.format(f=o.fieldname))
write(' } else {\n')
write(' s = format(s, "\\n%U{f}:", '
'format_white_space, indent);\n'.format(f=o.fieldname))