diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-16 13:59:27 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-23 08:36:07 -0400 |
| commit | 496764bbfbf66980fd533669eb213b2777f94b6a (patch) | |
| tree | fb806ba65ca0c3ec7bde16197e739272fd2648aa /lib/spf_backoff.c | |
| parent | 07436e2a526ec10355eb8aa7efc6063d8eb5eeb5 (diff) | |
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/spf_backoff.c')
| -rw-r--r-- | lib/spf_backoff.c | 5 |
1 files changed, 1 insertions, 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( |
