diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-10-26 13:32:08 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:44 -0500 |
commit | 464ad6b1ade186b53a1dae863361853326b85694 (patch) | |
tree | a8c7df2464050a6dffb5e1750355815d2336e82c /fs/nfs | |
parent | bcecff77a9c743ff67fdddeabc30ef76a6877886 (diff) |
NFS: Change sign of some loop indices in nfs4xdr.c
Nit: Eliminate some mixed sign comparisons in loop indices.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 2e1fe171bf73..eae46f008da7 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -2515,14 +2515,12 @@ static int decode_attr_files_total(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2515 | 2515 | ||
2516 | static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path) | 2516 | static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path) |
2517 | { | 2517 | { |
2518 | int n; | 2518 | u32 n; |
2519 | __be32 *p; | 2519 | __be32 *p; |
2520 | int status = 0; | 2520 | int status = 0; |
2521 | 2521 | ||
2522 | READ_BUF(4); | 2522 | READ_BUF(4); |
2523 | READ32(n); | 2523 | READ32(n); |
2524 | if (n < 0) | ||
2525 | goto out_eio; | ||
2526 | if (n == 0) | 2524 | if (n == 0) |
2527 | goto root_path; | 2525 | goto root_path; |
2528 | dprintk("path "); | 2526 | dprintk("path "); |
@@ -2579,13 +2577,11 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2579 | goto out_eio; | 2577 | goto out_eio; |
2580 | res->nlocations = 0; | 2578 | res->nlocations = 0; |
2581 | while (res->nlocations < n) { | 2579 | while (res->nlocations < n) { |
2582 | int m; | 2580 | u32 m; |
2583 | struct nfs4_fs_location *loc = &res->locations[res->nlocations]; | 2581 | struct nfs4_fs_location *loc = &res->locations[res->nlocations]; |
2584 | 2582 | ||
2585 | READ_BUF(4); | 2583 | READ_BUF(4); |
2586 | READ32(m); | 2584 | READ32(m); |
2587 | if (m <= 0) | ||
2588 | goto out_eio; | ||
2589 | 2585 | ||
2590 | loc->nservers = 0; | 2586 | loc->nservers = 0; |
2591 | dprintk("%s: servers ", __FUNCTION__); | 2587 | dprintk("%s: servers ", __FUNCTION__); |
@@ -2598,8 +2594,12 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2598 | if (loc->nservers < NFS4_FS_LOCATION_MAXSERVERS) | 2594 | if (loc->nservers < NFS4_FS_LOCATION_MAXSERVERS) |
2599 | loc->nservers++; | 2595 | loc->nservers++; |
2600 | else { | 2596 | else { |
2601 | int i; | 2597 | unsigned int i; |
2602 | dprintk("%s: using first %d of %d servers returned for location %d\n", __FUNCTION__, NFS4_FS_LOCATION_MAXSERVERS, m, res->nlocations); | 2598 | dprintk("%s: using first %u of %u servers " |
2599 | "returned for location %u\n", | ||
2600 | __FUNCTION__, | ||
2601 | NFS4_FS_LOCATION_MAXSERVERS, | ||
2602 | m, res->nlocations); | ||
2603 | for (i = loc->nservers; i < m; i++) { | 2603 | for (i = loc->nservers; i < m; i++) { |
2604 | unsigned int len; | 2604 | unsigned int len; |
2605 | char *data; | 2605 | char *data; |