summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-02-13 17:32:27 +0100
committerGitHub <noreply@github.com>2020-02-13 17:32:27 +0100
commit9df7724949a40900e08e1076259bd5dc08a07261 (patch)
tree5f205fa43f550eeaa3e1857033bdafdffe30f1cd /lib
parentMerge pull request #5805 from donaldsharp/babel_int_return (diff)
parent*: Remove break after return (diff)
downloadfrr-9df7724949a40900e08e1076259bd5dc08a07261.tar.xz
frr-9df7724949a40900e08e1076259bd5dc08a07261.zip
Merge pull request #5806 from ton31337/fix/remove_break_after_return
*: Remove break after return
Diffstat (limited to 'lib')
-rw-r--r--lib/filter.c4
-rw-r--r--lib/plist.c1
-rw-r--r--lib/prefix.c3
-rw-r--r--lib/routemap.c3
-rw-r--r--lib/sockopt.c2
-rw-r--r--lib/sockunion.c1
-rw-r--r--lib/vty.c3
-rw-r--r--lib/zclient.c2
8 files changed, 0 insertions, 19 deletions
diff --git a/lib/filter.c b/lib/filter.c
index 911a8e53d..80f8cf0bd 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -145,16 +145,12 @@ static const char *filter_type_str(struct filter *filter)
switch (filter->type) {
case FILTER_PERMIT:
return "permit";
- break;
case FILTER_DENY:
return "deny";
- break;
case FILTER_DYNAMIC:
return "dynamic";
- break;
default:
return "";
- break;
}
}
diff --git a/lib/plist.c b/lib/plist.c
index f6ceba81e..662221bee 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -919,7 +919,6 @@ static int vty_prefix_list_install(struct vty *vty, afi_t afi, const char *name,
default:
vty_out(vty, "%% Unrecognized AFI (%d)\n", afi);
return CMD_WARNING_CONFIG_FAILED;
- break;
}
/* If prefix has bits not under the mask, adjust it to fit */
diff --git a/lib/prefix.c b/lib/prefix.c
index 030ffe347..2b7727fd0 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -858,13 +858,10 @@ int prefix_blen(const struct prefix *p)
switch (p->family) {
case AF_INET:
return IPV4_MAX_BYTELEN;
- break;
case AF_INET6:
return IPV6_MAX_BYTELEN;
- break;
case AF_ETHERNET:
return ETH_ALEN;
- break;
}
return 0;
}
diff --git a/lib/routemap.c b/lib/routemap.c
index a604c5921..0d5621d90 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -741,13 +741,10 @@ static const char *route_map_type_str(enum route_map_type type)
switch (type) {
case RMAP_PERMIT:
return "permit";
- break;
case RMAP_DENY:
return "deny";
- break;
case RMAP_ANY:
return "";
- break;
}
return "";
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 3b12d16cb..d6c88c0af 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -537,10 +537,8 @@ ifindex_t getsockopt_ifindex(int af, struct msghdr *msgh)
switch (af) {
case AF_INET:
return (getsockopt_ipv4_ifindex(msgh));
- break;
case AF_INET6:
return (getsockopt_ipv6_ifindex(msgh));
- break;
default:
flog_err(EC_LIB_DEVELOPMENT,
"getsockopt_ifindex: unknown address family %d", af);
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 8fa9a3fad..e9c418fdf 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -124,7 +124,6 @@ static const char *sockunion_log(const union sockunion *su, char *buf,
case AF_INET6:
return inet_ntop(AF_INET6, &(su->sin6.sin6_addr), buf, len);
- break;
default:
snprintf(buf, len, "af_unknown %d ", su->sa.sa_family);
diff --git a/lib/vty.c b/lib/vty.c
index cf1613385..893c215b4 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1221,7 +1221,6 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
vty->sb_len = 0;
vty->iac_sb_in_progress = 1;
return 0;
- break;
case SE: {
if (!vty->iac_sb_in_progress)
return 0;
@@ -1261,7 +1260,6 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
}
vty->iac_sb_in_progress = 0;
return 0;
- break;
}
default:
break;
@@ -2060,7 +2058,6 @@ static int vtysh_flush(struct vty *vty)
buffer_reset(vty->obuf);
vty_close(vty);
return -1;
- break;
case BUFFER_EMPTY:
break;
}
diff --git a/lib/zclient.c b/lib/zclient.c
index d87906346..4f2ad959d 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -269,7 +269,6 @@ static int zclient_flush_data(struct thread *thread)
"%s: buffer_flush_available failed on zclient fd %d, closing",
__func__, zclient->sock);
return zclient_failed(zclient);
- break;
case BUFFER_PENDING:
zclient->t_write = NULL;
thread_add_write(zclient->master, zclient_flush_data, zclient,
@@ -293,7 +292,6 @@ int zclient_send_message(struct zclient *zclient)
"%s: buffer_write failed to zclient fd %d, closing",
__func__, zclient->sock);
return zclient_failed(zclient);
- break;
case BUFFER_EMPTY:
THREAD_OFF(zclient->t_write);
break;