xref: /linux/tools/net/sunrpc/xdrgen/templates/C/pointer/encoder/string.j2 (revision 9ad8d22f2f3fad7a366c9772362795ef6d6a2d51)
1{# SPDX-License-Identifier: GPL-2.0 #}
2{% if annotate %}
3	/* member {{ name }} (variable-length string) */
4{% endif %}
5	if (value->{{ name }}.len > {{ maxsize }})
6		return false;
7	if (xdr_stream_encode_opaque(xdr, value->{{ name }}.data, value->{{ name }}.len) < 0)
8		return false;
9