summaryrefslogtreecommitdiff
path: root/net/sunrpc/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-04-14 12:27:45 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-04-23 16:13:43 -0400
commit50c8bb13eaaf345caf2e7966667ba1d3e4d68af2 (patch)
treeb3bfef60963218d9c5ba4ece05561fcde20e7a77 /net/sunrpc/svc.c
parentc0401ea008fb7c785a93428752d69dccafb127ec (diff)
downloadlwn-50c8bb13eaaf345caf2e7966667ba1d3e4d68af2.tar.gz
lwn-50c8bb13eaaf345caf2e7966667ba1d3e4d68af2.zip
SUNRPC: Use unsigned index when looping over arrays
Clean up: Suppress a harmless compiler warning in the RPC server related to array indices. ARRAY_SIZE() returns a size_t, so use unsigned type for a loop index when looping over arrays. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r--net/sunrpc/svc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index e7b716c76366..bf46186ddf9f 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -534,8 +534,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
static void
svc_release_buffer(struct svc_rqst *rqstp)
{
- int i;
- for (i=0; i<ARRAY_SIZE(rqstp->rq_pages); i++)
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(rqstp->rq_pages); i++)
if (rqstp->rq_pages[i])
put_page(rqstp->rq_pages[i]);
}