mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
dns: remove redundant zero length namelen check
The zero namelen check is redundant as it has already been checked for zero at the start of the function. Remove the redundant check. Addresses-Coverity: ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
909620ff72
commit
62720b12d2
1 changed files with 0 additions and 2 deletions
|
@ -94,8 +94,6 @@ int dns_query(const char *type, const char *name, size_t namelen,
|
|||
desclen += typelen + 1;
|
||||
}
|
||||
|
||||
if (!namelen)
|
||||
namelen = strnlen(name, 256);
|
||||
if (namelen < 3 || namelen > 255)
|
||||
return -EINVAL;
|
||||
desclen += namelen + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue