SUNRPC: net/sunrpc/xdr.c: remove xdr_decode_string()
This patch removes ths unused function xdr_decode_string(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Neil Brown <neilb@suse.de> Acked-by: Charles Lever <Charles.Lever@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
a72b44222d
commit
fb459f45f7
@@ -92,27 +92,6 @@ xdr_encode_string(u32 *p, const char *string)
|
||||
return xdr_encode_array(p, string, strlen(string));
|
||||
}
|
||||
|
||||
u32 *
|
||||
xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen)
|
||||
{
|
||||
unsigned int len;
|
||||
char *string;
|
||||
|
||||
if ((len = ntohl(*p++)) > maxlen)
|
||||
return NULL;
|
||||
if (lenp)
|
||||
*lenp = len;
|
||||
if ((len % 4) != 0) {
|
||||
string = (char *) p;
|
||||
} else {
|
||||
string = (char *) (p - 1);
|
||||
memmove(string, p, len);
|
||||
}
|
||||
string[len] = '\0';
|
||||
*sp = string;
|
||||
return p + XDR_QUADLEN(len);
|
||||
}
|
||||
|
||||
u32 *
|
||||
xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user