aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r--net/sunrpc/xdr.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index aaf08cdd19f0..ca4bfa57e116 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -93,27 +93,6 @@ xdr_encode_string(u32 *p, const char *string)
93} 93}
94 94
95u32 * 95u32 *
96xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen)
97{
98 unsigned int len;
99 char *string;
100
101 if ((len = ntohl(*p++)) > maxlen)
102 return NULL;
103 if (lenp)
104 *lenp = len;
105 if ((len % 4) != 0) {
106 string = (char *) p;
107 } else {
108 string = (char *) (p - 1);
109 memmove(string, p, len);
110 }
111 string[len] = '\0';
112 *sp = string;
113 return p + XDR_QUADLEN(len);
114}
115
116u32 *
117xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen) 96xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen)
118{ 97{
119 unsigned int len; 98 unsigned int len;