提交 3476964d 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 6d8d1749
......@@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
struct svc_expkey key;
struct svc_expkey *ek = NULL;
if (mlen < 1 || mesg[mlen-1] != '\n')
if (mesg[mlen - 1] != '\n')
return -EINVAL;
mesg[mlen-1] = 0;
......
......@@ -509,7 +509,7 @@ static int unix_gid_parse(struct cache_detail *cd,
time_t expiry;
struct unix_gid ug, *ugp;
if (mlen <= 0 || mesg[mlen-1] != '\n')
if (mesg[mlen - 1] != '\n')
return -EINVAL;
mesg[mlen-1] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部