diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-04-14 12:27:52 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-23 16:13:43 -0400 |
commit | 0dc220f0815497858db539d27947f3ec83202ace (patch) | |
tree | 6aabb3947e45496fe78ed9a2500c2862274d2fc3 /net/sunrpc | |
parent | 50c8bb13eaaf345caf2e7966667ba1d3e4d68af2 (diff) | |
download | kernel_samsung_smdk4412-0dc220f0815497858db539d27947f3ec83202ace.zip kernel_samsung_smdk4412-0dc220f0815497858db539d27947f3ec83202ace.tar.gz kernel_samsung_smdk4412-0dc220f0815497858db539d27947f3ec83202ace.tar.bz2 |
SUNRPC: Use unsigned loop and array index in svc_init_buffer()
Clean up: Suppress a harmless compiler warning.
Index rq_pages[] with an unsigned type. Make "pages" unsigned as well,
as it never represents a value less than zero.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index bf46186..d74c2d2 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -510,8 +510,7 @@ EXPORT_SYMBOL(svc_destroy); static int svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) { - int pages; - int arghi; + unsigned int pages, arghi; pages = size / PAGE_SIZE + 1; /* extra page as we hold both request and reply. * We assume one is at most one page @@ -525,7 +524,7 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) rqstp->rq_pages[arghi++] = p; pages--; } - return ! pages; + return pages == 0; } /* |