]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Actually find the sequence number for large-community-list
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 2 Jul 2020 08:39:40 +0000 (11:39 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Sun, 5 Jul 2020 19:08:10 +0000 (22:08 +0300)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_vty.c

index 9c8f1e1def10293887d146cdc99b50fc49182ae9..67ff31df8f93f0734680084a3c4c64946aa87905 100644 (file)
@@ -17235,8 +17235,7 @@ static int lcommunity_list_set_vty(struct vty *vty, int argc,
        char *cl_name;
        char *seq = NULL;
 
-       argv_find(argv, argc, "(1-4294967295)", &idx);
-       if (idx)
+       if (argv_find(argv, argc, "(1-4294967295)", &idx))
                seq = argv[idx]->arg;
 
        idx = 0;
@@ -17285,8 +17284,7 @@ static int lcommunity_list_unset_vty(struct vty *vty, int argc,
        int idx = 0;
        char *seq = NULL;
 
-       argv_find(argv, argc, "(1-4294967295)", &idx);
-       if (idx)
+       if (argv_find(argv, argc, "(1-4294967295)", &idx))
                seq = argv[idx]->arg;
 
        idx = 0;