diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-11-10 01:30:12 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-11-10 23:35:22 +0100 |
commit | e1d1b1dec760f87ec5c1673e6ecbee9ec3f08fb0 (patch) | |
tree | ee21d3182dbdf8d9d2e14a35b4f8b0cd107fcfe1 | |
parent | Merge pull request #9988 from idryzhov/ospf-gr-broken (diff) | |
download | frr-e1d1b1dec760f87ec5c1673e6ecbee9ec3f08fb0.tar.xz frr-e1d1b1dec760f87ec5c1673e6ecbee9ec3f08fb0.zip |
pimd: Remove default from enum based switch
enum based switches should never use default. It makes
it very hard to fix and find issues when the enum is
changed.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r-- | pimd/pim_cmd.c | 2 | ||||
-rw-r--r-- | pimd/pim_upstream.c | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 4cd94e0df..e5ee7a82a 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -2446,8 +2446,6 @@ static const char *pim_reg_state2brief_str(enum pim_reg_state reg_state, case PIM_REG_PRUNE: strlcpy(state_str, "RegP", state_str_len); break; - default: - strlcpy(state_str, "Unk", state_str_len); } return state_str; } diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index d21c7b400..d0d120523 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1720,8 +1720,6 @@ const char *pim_reg_state2str(enum pim_reg_state reg_state, char *state_str, case PIM_REG_PRUNE: strlcpy(state_str, "RegPrune", state_str_len); break; - default: - strlcpy(state_str, "RegUnknown", state_str_len); } return state_str; } @@ -1785,7 +1783,7 @@ static int pim_upstream_register_stop_timer(struct thread *t) } pim_null_register_send(up); break; - default: + case PIM_REG_NOINFO: break; } |