xref: /linux/tools/net/sunrpc/xdrgen/templates/C/struct/encoder/fixed_length_array.j2 (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1{# SPDX-License-Identifier: GPL-2.0 #}
2{% if annotate %}
3	/* member {{ name }} (fixed-length array) */
4{% endif %}
5	for (u32 i = 0; i < {{ size }}; i++) {
6{% if type in pass_by_reference %}
7		if (xdrgen_encode_{{ type }}(xdr, &value->items[i]) < 0)
8{% else %}
9		if (xdrgen_encode_{{ type }}(xdr, value->items[i]) < 0)
10{% endif %}
11			return false;
12	}
13