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>
static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path)
{
static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path)
{
__be32 *p;
int status = 0;
READ_BUF(4);
READ32(n);
__be32 *p;
int status = 0;
READ_BUF(4);
READ32(n);
- if (n < 0)
- goto out_eio;
if (n == 0)
goto root_path;
dprintk("path ");
if (n == 0)
goto root_path;
dprintk("path ");
goto out_eio;
res->nlocations = 0;
while (res->nlocations < n) {
goto out_eio;
res->nlocations = 0;
while (res->nlocations < n) {
struct nfs4_fs_location *loc = &res->locations[res->nlocations];
READ_BUF(4);
READ32(m);
struct nfs4_fs_location *loc = &res->locations[res->nlocations];
READ_BUF(4);
READ32(m);
- if (m <= 0)
- goto out_eio;
loc->nservers = 0;
dprintk("%s: servers ", __FUNCTION__);
loc->nservers = 0;
dprintk("%s: servers ", __FUNCTION__);
if (loc->nservers < NFS4_FS_LOCATION_MAXSERVERS)
loc->nservers++;
else {
if (loc->nservers < NFS4_FS_LOCATION_MAXSERVERS)
loc->nservers++;
else {
- int i;
- dprintk("%s: using first %d of %d servers returned for location %d\n", __FUNCTION__, NFS4_FS_LOCATION_MAXSERVERS, m, res->nlocations);
+ unsigned int i;
+ dprintk("%s: using first %u of %u servers "
+ "returned for location %u\n",
+ __FUNCTION__,
+ NFS4_FS_LOCATION_MAXSERVERS,
+ m, res->nlocations);
for (i = loc->nservers; i < m; i++) {
unsigned int len;
char *data;
for (i = loc->nservers; i < m; i++) {
unsigned int len;
char *data;