From: Donald Sharp Date: Tue, 22 Jun 2021 16:36:16 +0000 (-0400) Subject: isisd: already checked for NULL X-Git-Tag: frr-8.0.1~53^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c4e1c62fcbb4ef7a96fc82abd1aef37a06bf5782;p=matthieu%2Ffrr.git 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 (cherry picked from commit 730649da0eb8700ac9853c6b77e5f0300f3f0c14) --- diff --git a/isisd/isisd.c b/isisd/isisd.c index 007bc541bd..133486cf95 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -2176,9 +2176,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);