tools/net/sunrpc/xdrgen/templates/C/pointer/decoder/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_decode_{{ name }}(struct xdr_stream *xdr, struct {{ name }} *ptr) |
| 12 | { |
| 13 | bool opted; |
| 14 | |
| 15 | {% if annotate %} |
| 16 | /* opted */ |
| 17 | {% endif %} |
| 18 | if (!xdrgen_decode_bool(xdr, &opted)) |
| 19 | return false; |
| 20 | if (!opted) |
| 21 | return true; |
| 22 |