From 496764bbfbf66980fd533669eb213b2777f94b6a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 16 Aug 2018 13:59:27 -0400 Subject: [PATCH] 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 --- lib/spf_backoff.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index c420c25f04..41d4e2bb57 100644 --- a/lib/spf_backoff.c +++ b/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) else rv = backoff->long_delay; break; - default: - zlog_warn("SPF Back-off(%s) in unknown state", backoff->name); - rv = backoff->init_delay; } backoff_debug( -- 2.39.5