diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-04-09 15:59:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-12 00:01:08 +0300 |
commit | 62720b12d20aecebc2e74642c37a3dc84717ac7a (patch) | |
tree | 9ec15b15145412a4bc1f2f80fc32be2ab73db50d /net/dns_resolver/dns_query.c | |
parent | 909620ff72c8fcf95b6ef1dca850b24bf016dd27 (diff) | |
download | linux-62720b12d20aecebc2e74642c37a3dc84717ac7a.tar.xz |
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>
Diffstat (limited to 'net/dns_resolver/dns_query.c')
-rw-r--r-- | net/dns_resolver/dns_query.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c index 76338c38738a..19aa32fc1802 100644 --- a/net/dns_resolver/dns_query.c +++ b/net/dns_resolver/dns_query.c @@ -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; |