aboutsummaryrefslogtreecommitdiff
path: root/slirp/udp6.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-06 15:13:22 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-11-10 15:07:53 +0100
commit4ded9bb54ceefeb68e766fe9aafc10de934c4501 (patch)
tree1dfac08e3ce18c48ea46626f3383f9212d9de0d7 /slirp/udp6.c
parent84ec9bfaf239b61bac3e43f708772937401e0e63 (diff)
slirp: Remove code that handles socreate() failure
Now that socreate() can never fail, we can remove the code that was trying to handle that situation. In particular this removes code in tcp_connect() that provoked Coverity to complain (CID 1005724): in closesocket(accept(inso->s, (struct sockaddr *)&addr, &addrlen)); if the accept() call fails then we pass closesocket() -1 instead of a valid file descriptor. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/udp6.c')
-rw-r--r--slirp/udp6.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/slirp/udp6.c b/slirp/udp6.c
index 7c4a6b003a..986010f0d3 100644
--- a/slirp/udp6.c
+++ b/slirp/udp6.c
@@ -91,9 +91,6 @@ void udp6_input(struct mbuf *m)
if (so == NULL) {
/* If there's no socket for this packet, create one. */
so = socreate(slirp);
- if (!so) {
- goto bad;
- }
if (udp_attach(so, AF_INET6) == -1) {
DEBUG_MISC((dfd, " udp6_attach errno = %d-%s\n",
errno, strerror(errno)));