diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-01-20 02:48:18 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-02-03 14:26:42 -0500 |
commit | 3476964dba98641716173445aade77d40cc6f27a (patch) | |
tree | e63392ae1073db8c91e96cab7c0127960c629925 | |
parent | 6d8d17499810479eabd10731179c04b2ca22152f (diff) |
nfsd: remove some unneeded checks
We check for zero length strings in the caller now, so these aren't
needed.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/export.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index cf8a6bd062fa..8e9689abbc0c 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) | |||
87 | struct svc_expkey key; | 87 | struct svc_expkey key; |
88 | struct svc_expkey *ek = NULL; | 88 | struct svc_expkey *ek = NULL; |
89 | 89 | ||
90 | if (mlen < 1 || mesg[mlen-1] != '\n') | 90 | if (mesg[mlen - 1] != '\n') |
91 | return -EINVAL; | 91 | return -EINVAL; |
92 | mesg[mlen-1] = 0; | 92 | mesg[mlen-1] = 0; |
93 | 93 | ||
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 01153ead1dba..6ab35736d88f 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -509,7 +509,7 @@ static int unix_gid_parse(struct cache_detail *cd, | |||
509 | time_t expiry; | 509 | time_t expiry; |
510 | struct unix_gid ug, *ugp; | 510 | struct unix_gid ug, *ugp; |
511 | 511 | ||
512 | if (mlen <= 0 || mesg[mlen-1] != '\n') | 512 | if (mesg[mlen - 1] != '\n') |
513 | return -EINVAL; | 513 | return -EINVAL; |
514 | mesg[mlen-1] = 0; | 514 | mesg[mlen-1] = 0; |
515 | 515 | ||