]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Remove default case statement from a enum driven switch
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Aug 2018 17:59:27 +0000 (13:59 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 23 Aug 2018 12:36:07 +0000 (08:36 -0400)
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>
lib/spf_backoff.c

index c420c25f04d0cc8c3f399731f9fd690a714de091..41d4e2bb578f2756d94568b075e57e5465b2c4fa 100644 (file)
@@ -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(