]> git.puffer.fish Git - matthieu/frr.git/commitdiff
eigrpd: Modify from int to boolean for display
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 3 Feb 2019 20:46:31 +0000 (15:46 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 3 Feb 2019 22:45:08 +0000 (17:45 -0500)
Track based upon boolean instead of an int

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
eigrpd/eigrp_dump.c
eigrpd/eigrp_dump.h
eigrpd/eigrp_vty.c

index 876e1cac0735ade2c1fee7248b3d86b096799cb9..6033290914f4b1dae5e7559db30efc294b9eaaae 100644 (file)
@@ -301,14 +301,14 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
 }
 
 void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
-                                struct eigrp_nexthop_entry *te, int *first)
+                                struct eigrp_nexthop_entry *te, bool *first)
 {
        if (te->reported_distance == EIGRP_MAX_METRIC)
                return;
 
        if (*first) {
                show_ip_eigrp_prefix_entry(vty, te->prefix);
-               *first = 0;
+               *first = false;
        }
 
        if (te->adv_router == eigrp->neighbor_self)
index 389ac1b5fddc8b93f5c72aa23ce9bff2ae980ac4..34b55ab419a930bc926c51389dd83b25972f391e 100644 (file)
@@ -156,8 +156,9 @@ extern void show_ip_eigrp_neighbor_sub(struct vty *, struct eigrp_neighbor *,
                                       int);
 extern void show_ip_eigrp_prefix_entry(struct vty *,
                                       struct eigrp_prefix_entry *);
-extern void show_ip_eigrp_nexthop_entry(struct vty *, struct eigrp *,
-                                       struct eigrp_nexthop_entry *, int *);
+extern void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
+                                       struct eigrp_nexthop_entry *ne,
+                                       bool *first);
 
 extern void eigrp_debug_init(void);
 
index 474f683989c07fbd5e75792136295f44f7c2f0e5..f1de59e0aaeedb0ac839f90a38711ee4e93d3125 100644 (file)
@@ -469,7 +469,7 @@ DEFUN (show_ip_eigrp_topology,
        struct eigrp_prefix_entry *tn;
        struct eigrp_nexthop_entry *te;
        struct route_node *rn;
-       int first;
+       bool first;
 
        eigrp = eigrp_lookup();
        if (eigrp == NULL) {
@@ -484,7 +484,7 @@ DEFUN (show_ip_eigrp_topology,
                        continue;
 
                tn = rn->info;
-               first = 1;
+               first = true;
                for (ALL_LIST_ELEMENTS_RO(tn->entries, node, te)) {
                        if (argc == 5
                            || (((te->flags