[Slirp] [Git][slirp/libslirp][master] Remove unnecessary break
Samuel Thibault
gitlab at gitlab.freedesktop.org
Mon Jun 1 11:18:02 UTC 2020
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
d877d74b by Philippe Mathieu-Daudé at 2020-06-01T13:17:45+02:00
Remove unnecessary break
The code is unreachable, so no need to break.
This silence static analyzer warnings.
Signed-off-by: Philippe Mathieu-Daudé <philmd at redhat.com>
Reviewed-by: Samuel Thibault <samuel.thibault at ens-lyon.org>
- - - - -
3 changed files:
- src/ip6_icmp.c
- src/slirp.c
- src/socket.c
Changes:
=====================================
src/ip6_icmp.c
=====================================
@@ -119,7 +119,6 @@ void icmp6_send_error(struct mbuf *m, uint8_t type, uint8_t code)
break;
default:
g_assert_not_reached();
- break;
}
t->m_data += ICMP6_ERROR_MINLEN;
memcpy(t->m_data, m->m_data, error_data_len);
=====================================
src/slirp.c
=====================================
@@ -975,7 +975,6 @@ int if_encap(Slirp *slirp, struct mbuf *ifm)
default:
g_assert_not_reached();
- break;
}
memcpy(eh->h_dest, ethaddr, ETH_ALEN);
=====================================
src/socket.c
=====================================
@@ -551,7 +551,6 @@ void sorecvfrom(struct socket *so)
break;
default:
g_assert_not_reached();
- break;
}
/*
@@ -603,7 +602,6 @@ void sorecvfrom(struct socket *so)
break;
default:
g_assert_not_reached();
- break;
}
m_free(m);
} else {
@@ -639,7 +637,6 @@ void sorecvfrom(struct socket *so)
break;
default:
g_assert_not_reached();
- break;
}
} /* rx error */
} /* if ping packet */
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/d877d74bea1b0c5680213ecd53fa630f6a8b1aba
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/d877d74bea1b0c5680213ecd53fa630f6a8b1aba
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20200601/cb817619/attachment-0001.htm>
More information about the Slirp
mailing list