Commit 3476964d authored by Dan Carpenter's avatar Dan Carpenter Committed by J. Bruce Fields

nfsd: remove some unneeded checks

We check for zero length strings in the caller now, so these aren't
needed.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 6d8d1749
...@@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) ...@@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
struct svc_expkey key; struct svc_expkey key;
struct svc_expkey *ek = NULL; struct svc_expkey *ek = NULL;
if (mlen < 1 || mesg[mlen-1] != '\n') if (mesg[mlen - 1] != '\n')
return -EINVAL; return -EINVAL;
mesg[mlen-1] = 0; mesg[mlen-1] = 0;
......
...@@ -509,7 +509,7 @@ static int unix_gid_parse(struct cache_detail *cd, ...@@ -509,7 +509,7 @@ static int unix_gid_parse(struct cache_detail *cd,
time_t expiry; time_t expiry;
struct unix_gid ug, *ugp; struct unix_gid ug, *ugp;
if (mlen <= 0 || mesg[mlen-1] != '\n') if (mesg[mlen - 1] != '\n')
return -EINVAL; return -EINVAL;
mesg[mlen-1] = 0; mesg[mlen-1] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment