use correct type for return value in qt_safe_sendto()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-10-01 21:07:04 +03:00
parent 23a8abed58
commit 41f8d0a034

View file

@ -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;
}