From: Elias Fleckenstein Date: Thu, 21 Apr 2022 20:55:13 +0000 (+0200) Subject: Use abort instead of exit X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=9ab2148e1b8d03dab816bbba6209794663b31576;p=dragonnet.git Use abort instead of exit --- diff --git a/recv.c b/recv.c index 4cb9be3..4d04c7d 100644 --- a/recv.c +++ b/recv.c @@ -14,7 +14,7 @@ bool dragonnet_recv_raw(DragonnetPeer *p, void *buf, size_t n) ssize_t len = recv(p->sock, buf, n, MSG_WAITALL); if (len < 0) { perror("recv"); - exit(EXIT_FAILURE); + abort(); } return len != 0; diff --git a/recv_thread.c b/recv_thread.c index 75069d9..6642bae 100644 --- a/recv_thread.c +++ b/recv_thread.c @@ -33,7 +33,7 @@ void *dragonnet_peer_recv_thread(void *g_peer) reset = true; } else { perror("recv"); - exit(EXIT_FAILURE); + abort(); } } diff --git a/send.c b/send.c index c9dc260..e2c9483 100644 --- a/send.c +++ b/send.c @@ -18,7 +18,7 @@ bool dragonnet_send_raw(DragonnetPeer *p, bool submit, const void *buf, size_t n } perror("send"); - exit(EXIT_FAILURE); + abort(); } if (submit)