Minor adjustments to address CI warnings

This commit is contained in:
Rodny Molina 2018-12-12 00:23:23 +00:00
parent e5b0aaf16b
commit 89cdc4df6c
6 changed files with 33 additions and 27 deletions

View 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,14 +649,14 @@ 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,
struct isis_vertex *originator =
isis_find_vertex(&f->spftree->paths,
lsp->hdr.lsp_id,
VTYPE_NONPSEUDO_TE_IS);

View 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,7 +1763,6 @@ 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;
@ -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) {

View 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:

View 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 */

View 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;