Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion soft_bfddpd/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ static int
bsessions_cmp(const struct bfd_session_data *bsda,
const struct bfd_session_data *bsdb)
{
return (int)(bsda->bsd_bs->bs_lid - bsdb->bsd_bs->bs_lid);
if (bsda->bsd_bs->bs_lid > bsdb->bsd_bs->bs_lid)
{
return 1;
}
else if(bsda->bsd_bs->bs_lid < bsd->bsd_bs->bs_lid)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if(bsda->bsd_bs->bs_lid < bsd->bsd_bs->bs_lid)
else if(bsda->bsd_bs->bs_lid < bsdb->bsd_bs->bs_lid)

{
return -1;
}
else
{
return 0;
}
}

RBT_HEAD(bsessionst, bfd_session_data) bsessionst;
Expand Down