summaryrefslogtreecommitdiff
path: root/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2
diff options
context:
space:
mode:
Diffstat (limited to 'tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2')
-rw-r--r--tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j24
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2 b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2
index 0b1709cca0d4..19b219dd276d 100644
--- a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2
+++ b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/argument.j2
@@ -14,7 +14,11 @@ bool {{ program }}_svc_decode_{{ argument }}(struct svc_rqst *rqstp, struct xdr_
{% if argument == 'void' %}
return xdrgen_decode_void(xdr);
{% else %}
+{% if argument in structs %}
struct {{ argument }} *argp = rqstp->rq_argp;
+{% else %}
+ {{ argument }} *argp = rqstp->rq_argp;
+{% endif %}
return xdrgen_decode_{{ argument }}(xdr, argp);
{% endif %}