]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix clang warning
authorVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:50:54 +0000 (23:50 +0200)
committerVincent JARDIN <vincent.jardin@6wind.com>
Sun, 8 Oct 2017 21:50:54 +0000 (23:50 +0200)
Same fix than c31a793, alwas get the string so clang does not complain that
it can be NULL.

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
bgpd/bgp_filter.c

index 6e1a1b6d620127992f8f8d9c08350f0700cbd941..ae9d805b055a846fdefc65c0a3170e6318fbf6bc 100644 (file)
@@ -410,8 +410,8 @@ DEFUN (ip_as_path,
        char *regstr;
 
        /* Retrieve access list name */
-       char *alname =
-               argv_find(argv, argc, "WORD", &idx) ? argv[idx]->arg : NULL;
+       argv_find(argv, argc, "WORD", &idx);
+       char *alname = argv[idx]->arg;
 
        /* Check the filter type. */
        type = argv_find(argv, argc, "deny", &idx) ? AS_FILTER_DENY