xref: /linux/tools/net/sunrpc/xdrgen/templates/C/union/encoder/basic.j2 (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*4b132aacSChuck Lever{# SPDX-License-Identifier: GPL-2.0 #}
2*4b132aacSChuck Lever{% if annotate %}
3*4b132aacSChuck Lever		/* member {{ name }} (basic) */
4*4b132aacSChuck Lever{% endif %}
5*4b132aacSChuck Lever{% if type in pass_by_reference %}
6*4b132aacSChuck Lever		if (!xdrgen_encode_{{ type }}(xdr, &ptr->u.{{ name }}))
7*4b132aacSChuck Lever{% else %}
8*4b132aacSChuck Lever		if (!xdrgen_encode_{{ type }}(xdr, ptr->u.{{ name }}))
9*4b132aacSChuck Lever{% endif %}
10*4b132aacSChuck Lever			return false;
11