Skip to content

Commit

Permalink
zebra: Remove debugs for retrieving a new nhg id
Browse files Browse the repository at this point in the history
This is not complicated code and if zebra is allocating
a new one.  Zebra does not need to inform the operator
about the process during debugs.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Jan 24, 2024
1 parent 7a3b649 commit 827fb64
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions zebra/zebra_nhg.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,13 @@ static uint32_t nhg_get_next_id(void)
while (1) {
id_counter++;

if (IS_ZEBRA_DEBUG_NHG_DETAIL)
zlog_debug("%s: ID %u checking", __func__, id_counter);

if (id_counter == ZEBRA_NHG_PROTO_LOWER) {
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
zlog_debug("%s: ID counter wrapped", __func__);

id_counter = 0;
continue;
}

if (zebra_nhg_lookup_id(id_counter)) {
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
zlog_debug("%s: ID already exists", __func__);

continue;
}

break;
if (!zebra_nhg_lookup_id(id_counter))
break;
}

return id_counter;
Expand Down

0 comments on commit 827fb64

Please sign in to comment.