SDL_net: PumpDatagramSocket(): change return type from int to bool

From 7f2789be74d7326bf0d745a3dd963e5b244cf5cd Mon Sep 17 00:00:00 2001
From: andy5995 <[EMAIL REDACTED]>
Date: Tue, 13 May 2025 22:41:06 -0500
Subject: [PATCH] PumpDatagramSocket(): change return type from int to bool

---
 src/SDL_net.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/SDL_net.c b/src/SDL_net.c
index 461c951..c054858 100644
--- a/src/SDL_net.c
+++ b/src/SDL_net.c
@@ -1361,11 +1361,11 @@ static NET_Status SendOneDatagram(NET_DatagramSocket *sock, NET_Address *addr, U
 }
 
 // see if any pending data can finally be sent, etc
-static int PumpDatagramSocket(NET_DatagramSocket *sock)
+static bool PumpDatagramSocket(NET_DatagramSocket *sock)
 {
     if (!sock) {
         SDL_InvalidParamError("sock");
-        return -1;
+        return false;
     }
 
     while (sock->pending_output_len > 0) {
@@ -1373,7 +1373,7 @@ static int PumpDatagramSocket(NET_DatagramSocket *sock)
         NET_Datagram *dgram = sock->pending_output[0];
         const int rc = SendOneDatagram(sock, dgram->addr, dgram->port, dgram->buf, dgram->buflen);
         if (rc < 0) {  // failure!
-            return -1;
+            return false;
         } else if (rc == 0) {  // wouldblock
             break;  // stop trying to send packets for now.
         }
@@ -1385,13 +1385,13 @@ static int PumpDatagramSocket(NET_DatagramSocket *sock)
         sock->pending_output[sock->pending_output_len] = NULL;
     }
 
-    return 0;
+    return true;
 }
 
 
 bool NET_SendDatagram(NET_DatagramSocket *sock, NET_Address *addr, Uint16 port, const void *buf, int buflen)
 {
-    if (PumpDatagramSocket(sock) < 0) {  // try to flush any queued data to the socket now, before we handle more.
+    if (!PumpDatagramSocket(sock)) {  // try to flush any queued data to the socket now, before we handle more.
         return false;
     } else if (addr == NULL) {
         return SDL_InvalidParamError("address");
@@ -1461,7 +1461,7 @@ bool NET_ReceiveDatagram(NET_DatagramSocket *sock, NET_Datagram **dgram)
 
     *dgram = NULL;
 
-    if (PumpDatagramSocket(sock) < 0) {  // try to flush any queued data to the socket now, before we go further.
+    if (!PumpDatagramSocket(sock)) {  // try to flush any queued data to the socket now, before we go further.
         return false;
     }