summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-12-04 12:23:16 +0100
committerThomas Haller <thaller@redhat.com>2023-12-04 12:23:18 +0100
commit9466f680a58c483fbe14acd792f36a27f3d79bad (patch)
tree05afc287a0356fbdeb81589187fde4fb63842ced
parentacd05d6e8066f775474cbcf00b85b4743efe896e (diff)
downloadlibnl-9466f680a58c483fbe14acd792f36a27f3d79bad.tar.gz
lib: remove unused assignment in nl_addr_parse()
Coverity warns about this. Avoid it. Error: CLANG_WARNING: [#def3] libnl-3.8.0/lib/addr.c:324:3: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 322| !strcasecmp(str, "any")) { # 323| # 324|-> len = 0; # 325| # 326| switch (hint) {
-rw-r--r--lib/addr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/addr.c b/lib/addr.c
index 34f56330..89a3b38d 100644
--- a/lib/addr.c
+++ b/lib/addr.c
@@ -321,8 +321,6 @@ int nl_addr_parse(const char *addrstr, int hint, struct nl_addr **result)
!strcasecmp(str, "all") ||
!strcasecmp(str, "any")) {
- len = 0;
-
switch (hint) {
case AF_INET:
case AF_UNSPEC: