Skip to content

Commit

Permalink
zebra: return void zebra_mpls_lsp_install
Browse files Browse the repository at this point in the history
zebra_mpls_lsp_install() returned integer is never checked.

Return void instead.

Signed-off-by: Dmytro Shytyi <[email protected]>
  • Loading branch information
dmytroshytyi-6WIND committed Jun 7, 2024
1 parent b26372b commit 07175f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions zebra/zebra_mpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,31 +2196,28 @@ void zebra_mpls_process_dplane_notify(struct zebra_dplane_ctx *ctx)
/*
* Install dynamic LSP entry.
*/
int zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
void zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
struct route_entry *re)
{
struct route_table *table;
struct zebra_fec *fec;

table = zvrf->fec_table[family2afi(PREFIX_FAMILY(&rn->p))];
if (!table)
return -1;
return;

/* See if there is a configured label binding for this FEC. */
fec = fec_find(table, &rn->p);
if (!fec || fec->label == MPLS_INVALID_LABEL)
return 0;
return;

/* We cannot install a label forwarding entry if local label is the
* implicit-null label.
*/
if (fec->label == MPLS_LABEL_IMPLICIT_NULL)
return 0;

if (lsp_install(zvrf, fec->label, rn, re))
return -1;
return;

return 0;
lsp_install(zvrf, fec->label, rn, re);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_mpls.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int zebra_mpls_write_label_block_config(struct vty *vty, struct zebra_vrf *vrf);
/*
* Install dynamic LSP entry.
*/
int zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
void zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
struct route_entry *re);

/*
Expand Down

0 comments on commit 07175f6

Please sign in to comment.