]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd isisd zebra: misuse of comma operator 3031/head
authorF. Aragon <paco@voltanet.io>
Fri, 14 Sep 2018 13:47:41 +0000 (15:47 +0200)
committerF. Aragon <paco@voltanet.io>
Fri, 14 Sep 2018 13:55:56 +0000 (15:55 +0200)
Detected using ./configure CFLAGS=-Wcomma CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
bgpd/rfapi/rfapi_vty.c
isisd/isis_circuit.c
zebra/zebra_ns.c
zebra/zebra_vxlan.c

index 9f8270097a0437aa4d11cd891055dcc8aaed7b6d..1dc2d02f15719d927fd34736014a25e0ac43195d 100644 (file)
@@ -2004,7 +2004,8 @@ register_add(struct vty *vty, struct cmd_token *carg_prefix,
                                        "Missing parameter for local-next-hop\n");
                                return CMD_WARNING_CONFIG_FAILED;
                        }
-                       ++argv, --argc;
+                       ++argv;
+                       --argc;
                        arg_lnh = argv[0]->arg;
                }
                if (strmatch(argv[0]->text, "local-cost")) {
@@ -2018,7 +2019,8 @@ register_add(struct vty *vty, struct cmd_token *carg_prefix,
                                        "Missing parameter for local-cost\n");
                                return CMD_WARNING_CONFIG_FAILED;
                        }
-                       ++argv, --argc;
+                       ++argv;
+                       --argc;
                        arg_lnh_cost = argv[0]->arg;
                }
        }
index 817a44bafe66fad4e2598c7f30d6d8b360a0559c..f96c99ab7e0ba3a5b37434afaa71dfff92205974 100644 (file)
@@ -897,16 +897,16 @@ void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
                        vty_out(vty, "    IP Prefix(es):\n");
                        for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node,
                                                  ip_addr)) {
-                               prefix2str(ip_addr, buf, sizeof(buf)),
-                                       vty_out(vty, "      %s\n", buf);
+                               prefix2str(ip_addr, buf, sizeof(buf));
+                               vty_out(vty, "      %s\n", buf);
                        }
                }
                if (circuit->ipv6_link && listcount(circuit->ipv6_link) > 0) {
                        vty_out(vty, "    IPv6 Link-Locals:\n");
                        for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node,
                                                  ip_addr)) {
-                               prefix2str(ip_addr, (char *)buf, BUFSIZ),
-                                       vty_out(vty, "      %s\n", buf);
+                               prefix2str(ip_addr, (char *)buf, BUFSIZ);
+                               vty_out(vty, "      %s\n", buf);
                        }
                }
                if (circuit->ipv6_non_link
@@ -914,8 +914,8 @@ void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
                        vty_out(vty, "    IPv6 Prefixes:\n");
                        for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link, node,
                                                  ip_addr)) {
-                               prefix2str(ip_addr, (char *)buf, BUFSIZ),
-                                       vty_out(vty, "      %s\n", buf);
+                               prefix2str(ip_addr, (char *)buf, BUFSIZ);
+                               vty_out(vty, "      %s\n", buf);
                        }
                }
 
index aedb7c94956272dbeb4c2e21fd8b65f691be74b9..c5e88daf791900e7f74659d3ca14980bf4d6d1f3 100644 (file)
@@ -275,8 +275,7 @@ int zebra_ns_disable(ns_id_t ns_id, void **info)
 
        hash_clean(zns->rules_hash, zebra_pbr_rules_free);
        hash_free(zns->rules_hash);
-       hash_clean(zns->ipset_entry_hash,
-                  zebra_pbr_ipset_entry_free),
+       hash_clean(zns->ipset_entry_hash, zebra_pbr_ipset_entry_free);
        hash_clean(zns->ipset_hash, zebra_pbr_ipset_free);
        hash_free(zns->ipset_hash);
        hash_free(zns->ipset_entry_hash);
index a0a90ac28c2fa4e1999f0c86ccb769358b2363d2..672f285bf228d70120b75137581e465a7119510c 100644 (file)
@@ -285,7 +285,8 @@ static void zvni_find_neigh_addr_width(struct hash_backet *backet, void *ctxt)
 
        n = (zebra_neigh_t *)backet->data;
 
-       ipaddr2str(&n->ip, buf, sizeof(buf)), width = strlen(buf);
+       ipaddr2str(&n->ip, buf, sizeof(buf));
+       width = strlen(buf);
        if (width > wctx->addr_width)
                wctx->addr_width = width;