Debian Codegraph @

tools/net/sunrpc/xdrgen/templates/C/pointer/encoder/open.j2

raw
1 {# SPDX-License-Identifier: GPL-2.0 #}
2
3 {% if annotate %}
4 /* pointer {{ name }} */
5 {% endif %}
6 {% if name in public_apis %}
7 bool
8 {% else %}
9 static bool __maybe_unused
10 {% endif %}
11 xdrgen_encode_{{ name }}(struct xdr_stream *xdr, const struct {{ name }} *value)
12 {
13 {% if annotate %}
14 /* opted */
15 {% endif %}
16 if (!xdrgen_encode_bool(xdr, value != NULL))
17 return false;
18 if (!value)
19 return true;
20