Skip to content

Commit 90d871b

Browse files
committed
SUNRPC: Clean up xdr_commit_encode()
Both the kvec::iov_len field and the third parameter of memcpy() and memmove() are size_t. There's no reason for the implicit conversion from size_t to int and back. Change the type of @shift to make the code easier to read and understand. Signed-off-by: Chuck Lever <[email protected]> Reviewed-by: NeilBrown <[email protected]> Reviewed-by: J. Bruce Fields <[email protected]>
1 parent 62ed448 commit 90d871b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ EXPORT_SYMBOL_GPL(xdr_init_encode);
933933
*/
934934
void __xdr_commit_encode(struct xdr_stream *xdr)
935935
{
936-
int shift = xdr->scratch.iov_len;
936+
size_t shift = xdr->scratch.iov_len;
937937
void *page;
938938

939939
page = page_address(*xdr->page_ptr);

0 commit comments

Comments
 (0)