From: Adrian Bunk Date: Tue, 3 Jan 2006 08:55:41 +0000 (+0100) Subject: SUNRPC: net/sunrpc/xdr.c: remove xdr_decode_string() X-Git-Tag: v2.6.16-rc1~935^2~4^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb459f45f7c7689714023d41b3dca999bb90a5d3;p=platform%2Fkernel%2Flinux-3.10.git SUNRPC: net/sunrpc/xdr.c: remove xdr_decode_string() This patch removes ths unused function xdr_decode_string(). Signed-off-by: Adrian Bunk Acked-by: Neil Brown Acked-by: Charles Lever Signed-off-by: Trond Myklebust --- diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 5676794..84c35d4 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -91,7 +91,6 @@ struct xdr_buf { u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); u32 * xdr_encode_string(u32 *p, const char *s); -u32 * xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen); u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index aaf08cdd..ca4bfa5 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -93,27 +93,6 @@ xdr_encode_string(u32 *p, const char *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) { unsigned int len;