]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: already checked for NULL
authorDonald Sharp <sharpd@nvidia.com>
Tue, 22 Jun 2021 16:36:16 +0000 (12:36 -0400)
committermergify-bot <noreply@mergify.io>
Sun, 25 Jul 2021 12:44:02 +0000 (12:44 +0000)
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 <sharpd@nvidia.com>
(cherry picked from commit 730649da0eb8700ac9853c6b77e5f0300f3f0c14)

isisd/isisd.c

index 007bc541bddcfcda13c2ccc09dda6ccb2a5a0aa5..133486cf95609a9eb0810f6d3ff76db6bf299187 100644 (file)
@@ -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);