The function sendto is returning -1 on an error and not an errno code. But
since -EPERM is -1, no functional change is expected.

Signed-off-by: Sven Eckelmann <[email protected]>
---
 send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/send.c b/send.c
index 8290c98..bd5b9a3 100644
--- a/send.c
+++ b/send.c
@@ -189,7 +189,7 @@ ssize_t send_alfred_packet(struct globals *globals, struct 
interface *interface,
                return 0;
 
        ret = sendto(interface->netsock, buf, length, 0, dest_addr, slen);
-       if (ret == -EPERM) {
+       if (ret == -1) {
                perror("Error during sent");
                close(interface->netsock);
                close(interface->netsock_mcast);

-- 
2.47.3

Reply via email to