From 41f8d0a034c49ea02d094e398d7113a5b9505f35 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 1 Oct 2021 21:07:04 +0300 Subject: [PATCH] use correct type for return value in qt_safe_sendto() Signed-off-by: Ivailo Monev --- src/network/socket/qnet_unix_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h index 5b92c8ea1..98d94df80 100644 --- a/src/network/socket/qnet_unix_p.h +++ b/src/network/socket/qnet_unix_p.h @@ -86,7 +86,7 @@ static inline ssize_t qt_safe_recvfrom(int sockfd, void *buf, size_t len, int fl return ret; } -static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, QT_SOCKLEN_T tolen) +static inline ssize_t qt_safe_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, QT_SOCKLEN_T tolen) { #ifdef MSG_NOSIGNAL flags |= MSG_NOSIGNAL; @@ -94,7 +94,7 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl qt_ignore_sigpipe(); #endif - int ret; + ssize_t ret; Q_EINTR_LOOP(ret, ::sendto(sockfd, buf, len, flags, to, tolen)); return ret; } -- 2.11.0