From 730649da0eb8700ac9853c6b77e5f0300f3f0c14 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 22 Jun 2021 12:36:16 -0400 Subject: [PATCH] isisd: already checked for NULL in lsp_for_arg we have already checked for NULL and returned if argv is null. We do not need to check for it again. Signed-off-by: Donald Sharp --- isisd/isisd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/isisd/isisd.c b/isisd/isisd.c index 7e78e0ce69..ed55e3ba48 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -2192,9 +2192,9 @@ struct isis_lsp *lsp_for_arg(struct lspdb_head *head, const char *argv, * Where systemid is in the form: * xxxx.xxxx.xxxx */ - if (argv) - strlcpy(sysid, argv, sizeof(sysid)); - if (argv && strlen(argv) > 3) { + strlcpy(sysid, argv, sizeof(sysid)); + + if (strlen(argv) > 3) { pos = argv + strlen(argv) - 3; if (strncmp(pos, "-", 1) == 0) { memcpy(number, ++pos, 2); -- 2.39.5