summaryrefslogtreecommitdiffhomepage
path: root/src/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-12 03:45:05 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commitc90afbeddf9aa217c419b95e496337c89a1e4ba2 (patch)
treeb25bdaeeef582b828c08915b438ea7c371444318 /src/socket.c
parent9ad5a4f2bcc3ca0db245679b396563a71df4c49c (diff)
socket: eliminate dead code
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c
index e3fd053..8d0e9ca 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -199,8 +199,7 @@ int socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg, struct sk_bu
ret = send4(wg, skb, &endpoint, 0, NULL);
else if (endpoint.addr.sa_family == AF_INET6)
ret = send6(wg, skb, &endpoint, 0, NULL);
- else
- ret = -EAFNOSUPPORT;
+ /* No other possibilities if the endpoint is valid, which it is, as we checked above. */
return ret;
}