]> git.proxmox.com Git - mirror_frr.git/commitdiff
Minor adjustments to address CI warnings
authorRodny Molina <rmolina@linkedin.com>
Wed, 12 Dec 2018 00:23:23 +0000 (00:23 +0000)
committerRodny Molina <rmolina@linkedin.com>
Wed, 12 Dec 2018 00:23:23 +0000 (00:23 +0000)
isisd/fabricd.c
isisd/isis_pdu.c
isisd/isis_pdu_counter.c
isisd/isis_tx_queue.c
isisd/isis_tx_queue.h
isisd/isis_vty_fabricd.c

index 152bfb5283c20c304f0e2745b4b6ca2b3ab0a070..e8b729c779cb21286f4b4ba2e4fa0a91f5af8bad 100644 (file)
@@ -81,7 +81,8 @@ struct neighbor_entry {
 static struct neighbor_entry *neighbor_entry_new(const uint8_t *id,
                                                 struct isis_adjacency *adj)
 {
-       struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR, sizeof(*rv));
+       struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR,
+                                           sizeof(*rv));
 
        memcpy(rv->id, id, sizeof(rv->id));
        rv->adj = adj;
@@ -131,7 +132,7 @@ static int neighbor_entry_list_cmp(void *a, void *b)
 static struct neighbor_entry *neighbor_entry_lookup_list(struct skiplist *list,
                                                         const uint8_t *id)
 {
-       struct neighbor_entry n = {{0}};
+       struct neighbor_entry n = { {0} };
 
        memcpy(n.id, id, sizeof(n.id));
 
@@ -551,7 +552,8 @@ static void move_to_queue(struct isis_lsp *lsp, struct neighbor_entry *n,
        if (n->adj)
                isis_tx_queue_add(n->adj->circuit->tx_queue, lsp, type);
 
-       uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO, sizeof(n->id));
+       uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO,
+                                      sizeof(n->id));
 
        memcpy(neighbor_id, n->id, sizeof(n->id));
        listnode_add(lsp->flooding_neighbors[type], neighbor_id);
@@ -624,7 +626,8 @@ static void fabricd_lsp_reset_flooding_info(struct isis_lsp *lsp,
                }
 
                lsp->flooding_neighbors[type] = list_new();
-               lsp->flooding_neighbors[type]->del = fabricd_free_lsp_flooding_info;
+               lsp->flooding_neighbors[type]->del =
+                       fabricd_free_lsp_flooding_info;
        }
 
        if (circuit) {
@@ -646,16 +649,16 @@ void fabricd_lsp_flood(struct isis_lsp *lsp, struct isis_circuit *circuit)
        struct neighbor_entry *n;
 
        /* Mark all elements in NL as present */
-       while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor)) {
+       while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor))
                n->present = true;
-       }
 
        /* Mark all elements in NN as present */
        hash_iterate(f->neighbors_neighbors, mark_neighbor_as_present, NULL);
 
-       struct isis_vertex *originator = isis_find_vertex(&f->spftree->paths,
-                                                         lsp->hdr.lsp_id,
-                                                         VTYPE_NONPSEUDO_TE_IS);
+       struct isis_vertex *originator =
+               isis_find_vertex(&f->spftree->paths,
+                                lsp->hdr.lsp_id,
+                                VTYPE_NONPSEUDO_TE_IS);
 
        /* Remove all IS from NL and NN in the shortest path
         * to the IS that originated the LSP */
index 349812dcaeaf1d3cd0135a3062083bd1a44c7264..6303536c1111f12b997f1f7738fa1e8cea20e76f 100644 (file)
@@ -708,11 +708,10 @@ static void lsp_flood_or_update(struct isis_lsp *lsp,
                                struct isis_circuit *circuit,
                                bool circuit_scoped)
 {
-       if (!circuit_scoped) {
+       if (!circuit_scoped)
                lsp_flood(lsp, circuit);
-       } else {
+       else
                fabricd_update_lsp_no_flood(lsp, circuit);
-       }
 }
 
 /*
@@ -990,7 +989,8 @@ dontcheckadj:
                                /* our own LSP -> 7.3.16.4 c) */
                                if (comp == LSP_NEWER) {
                                        lsp_inc_seqno(lsp, hdr.seqno);
-                                       lsp_flood_or_update(lsp, NULL, circuit_scoped);
+                                       lsp_flood_or_update(lsp, NULL,
+                                                           circuit_scoped);
                                } else {
                                        isis_tx_queue_add(circuit->tx_queue,
                                                          lsp, TX_LSP_NORMAL);
@@ -998,7 +998,9 @@ dontcheckadj:
                                }
                                if (isis->debugs & DEBUG_UPDATE_PACKETS)
                                        zlog_debug(
-                                               "ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32,
+                                               "ISIS-Upd (%s): (1) "
+                                               "re-originating LSP %s new seq "
+                                               "0x%08" PRIx32,
                                                circuit->area->area_tag,
                                                rawlspid_print(hdr.lsp_id),
                                                lsp->hdr.seqno);
@@ -1746,7 +1748,8 @@ int send_hello(struct isis_circuit *circuit, int level)
 
        isis_free_tlvs(tlvs);
 
-       pdu_counter_count(circuit->area->pdu_tx_counters, hello_pdu_type(circuit, level));
+       pdu_counter_count(circuit->area->pdu_tx_counters,
+                         hello_pdu_type(circuit, level));
        retval = circuit->tx(circuit, level);
        if (retval != ISIS_OK)
                flog_err(EC_ISIS_PACKET,
@@ -1760,9 +1763,8 @@ int send_hello(struct isis_circuit *circuit, int level)
 static int send_hello_cb(struct thread *thread)
 {
        struct isis_circuit_arg *arg = THREAD_ARG(thread);
-       
        assert(arg);
-       
+
        struct isis_circuit *circuit = arg->circuit;
        int level = arg->level;
 
@@ -2248,7 +2250,8 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp,
 
        if (tx_type == TX_LSP_CIRCUIT_SCOPED) {
                stream_putc_at(circuit->snd_stream, 4, FS_LINK_STATE);
-               stream_putc_at(circuit->snd_stream, 7, L2_CIRCUIT_FLOODING_SCOPE);
+               stream_putc_at(circuit->snd_stream, 7,
+                              L2_CIRCUIT_FLOODING_SCOPE);
        }
 
        if (isis->debugs & DEBUG_UPDATE_PACKETS) {
index 90bb758c2c83005ff6647b4a0b38f82233b17f57..ec2a0c207613bc70879a512cdf19b167b96f39c8 100644 (file)
@@ -56,7 +56,7 @@ static int pdu_type_to_counter_index(uint8_t pdu_type)
 
 static const char *pdu_counter_index_to_name(enum pdu_counter_index index)
 {
-       switch(index) {
+       switch (index) {
        case L1_LAN_HELLO_INDEX:
                return " L1 IIH";
        case L2_LAN_HELLO_INDEX:
index bf5817d0084e9630f1bf1e91a33f876c40ae9bec..270dcae7d0a07b734fc110433aebce8e8bc22606 100644 (file)
@@ -125,11 +125,11 @@ static int tx_queue_send_event(struct thread *thread)
        e->retry = NULL;
        thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
 
-       if (e->is_retry) {
+       if (e->is_retry)
                queue->circuit->area->lsp_rxmt_count++;
-       } else {
+       else
                e->is_retry = true;
-       }
+
        queue->send_event(queue->circuit, e->lsp, e->type);
        /* Don't access e here anymore, send_event might have destroyed it */
 
index 7b01f1a3d4f83d9a1a95c77c785ed146a9326fb4..c2beda45b72953513aa951bc9d6388534cff3bbf 100644 (file)
@@ -42,8 +42,8 @@ void isis_tx_queue_free(struct isis_tx_queue *queue);
        _isis_tx_queue_add((queue), (lsp), (type), \
                           __func__, __FILE__, __LINE__)
 void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
-                       enum isis_tx_type type, const char *func,
-                       const char *file, int line);
+                       enum isis_tx_type type, const char *func,
+                       const char *file, int line);
 
 #define isis_tx_queue_del(queue, lsp) \
        _isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
index aa4ccdd075558c90c6c96d643762ec2455c6a63a..aa48fe1d3a2123dec505097c784b2adee94cdc52 100644 (file)
@@ -120,7 +120,8 @@ static void lsp_print_flooding(struct vty *vty, struct isis_lsp *lsp)
        vty_out(vty, " ago)\n");
 
        if (lsp->flooding_circuit_scoped) {
-               vty_out(vty, "    Received as circuit-scoped LSP, so not flooded.\n");
+               vty_out(vty, "    Received as circuit-scoped LSP, so not "
+                       "flooded.\n");
                return;
        }
 
@@ -149,9 +150,8 @@ DEFUN (show_lsp_flooding,
 {
        const char *lspid = NULL;
 
-       if (argc == 4) {
+       if (argc == 4)
                lspid = argv[3]->arg;
-       }
 
        struct listnode *node;
        struct isis_area *area;