Skip to content
Browse files

lib: Remove default case statement from a enum driven switch

We are using a enum to drive a switch statement and we have
a default case statement that can never be entered because
we know all the enum states have been covered.  Remove it
from the code as that it cannot happen.

Signed-off-by: Donald Sharp <>
  • Loading branch information...
donaldsharp committed Aug 16, 2018
1 parent 07436e2 commit 496764bbfbf66980fd533669eb213b2777f94b6a
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/spf_backoff.c
@@ -143,7 +143,7 @@ static int spf_backoff_holddown_elapsed(struct thread *thread)

long spf_backoff_schedule(struct spf_backoff *backoff)
long rv;
long rv = 0;
struct timeval now;

gettimeofday(&now, NULL);
@@ -176,9 +176,6 @@ long spf_backoff_schedule(struct spf_backoff *backoff)
rv = backoff->long_delay;
zlog_warn("SPF Back-off(%s) in unknown state", backoff->name);
rv = backoff->init_delay;


0 comments on commit 496764b

Please sign in to comment.
You can’t perform that action at this time.