From: Donald Sharp Date: Thu, 16 Aug 2018 17:59:27 +0000 (-0400) Subject: lib: Remove default case statement from a enum driven switch X-Git-Tag: frr-6.1-dev~31^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=496764bbfbf66980fd533669eb213b2777f94b6a;p=mirror_frr.git 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 --- diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index c420c25f0..41d4e2bb5 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(