Skip to content

Commit

Permalink
zebra: Use the enum, luke
Browse files Browse the repository at this point in the history
Use the enum and let the compiler help us figure out
what cases are being missed.

Signed-off-by: Donald Sharp <[email protected]>
(cherry picked from commit dc31de9)
  • Loading branch information
donaldsharp authored and mergify[bot] committed Nov 15, 2022
1 parent 72e7872 commit 5a35dd3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions zebra/dplane_fpm_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ static void fpm_process_queue(struct thread *t)
static void fpm_process_event(struct thread *t)
{
struct fpm_nl_ctx *fnc = THREAD_ARG(t);
int event = THREAD_VAL(t);
enum fpm_nl_events event = THREAD_VAL(t);

switch (event) {
case FNE_DISABLE:
Expand Down Expand Up @@ -1328,11 +1328,6 @@ static void fpm_process_event(struct thread *t)
if (IS_ZEBRA_DEBUG_FPM)
zlog_debug("%s: LSP walk finished", __func__);
break;

default:
if (IS_ZEBRA_DEBUG_FPM)
zlog_debug("%s: unhandled event %d", __func__, event);
break;
}
}

Expand Down

0 comments on commit 5a35dd3

Please sign in to comment.