Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Adrian Bunk and committed by
Trond Myklebust
fb459f45 a72b4422

-22
-1
include/linux/sunrpc/xdr.h
··· 91 91 u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); 92 92 u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); 93 93 u32 * xdr_encode_string(u32 *p, const char *s); 94 - u32 * xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen); 95 94 u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); 96 95 u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); 97 96 u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *);
-21
net/sunrpc/xdr.c
··· 93 93 } 94 94 95 95 u32 * 96 - xdr_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 - 116 - u32 * 117 96 xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen) 118 97 { 119 98 unsigned int len;