summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-06-29 17:01:29 +0200
committerF. Aragon <paco@voltanet.io>2018-06-29 17:47:05 +0200
commite36e5b569c24ba0f28549b78677b9806da9965d3 (patch)
tree008de858df257a0e12477c241d210159d7f9dbbc
parent62a9c814e1721a76b251d7c8861c51f196458695 (diff)
isisd zebra: dead code (Clang scan)
This correction fixes two bugs detected by Clang scan: Bug Group: Dead store Bug Type: Dead assignment File: zebra/kernel_netlink.c Function: netlink_parse_extended_ack Line: 548 Bug Type: Dead increment File: isisd/isis_lsp.c Function: lsp_bits2string Line: 625 Signed-off-by: F. Aragon <paco@voltanet.io>
-rw-r--r--isisd/isis_lsp.c2
-rw-r--r--zebra/kernel_netlink.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index bba86d4c1f..67e6bac8d7 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -622,7 +622,7 @@ static const char *lsp_bits2string(uint8_t lsp_bits, char *buf, size_t buf_size)
pos += sprintf(pos, "%d/",
ISIS_MASK_LSP_PARTITION_BIT(lsp_bits) ? 1 : 0);
- pos += sprintf(pos, "%d", ISIS_MASK_LSP_OL_BIT(lsp_bits) ? 1 : 0);
+ sprintf(pos, "%d", ISIS_MASK_LSP_OL_BIT(lsp_bits) ? 1 : 0);
return buf;
}
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 7334c8094a..d9c6631845 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -545,7 +545,6 @@ static void netlink_parse_extended_ack(struct nlmsghdr *h)
if (off > h->nlmsg_len) {
zlog_err("Invalid offset for NLMSGERR_ATTR_OFFS\n");
- off = 0;
} else if (!(h->nlmsg_flags & NLM_F_CAPPED)) {
/*
* Header of failed message