Merge branch 'zhaozg/master'

This commit is contained in:
Caleb Maclennan 2022-08-30 13:17:21 +03:00
commit 48164b572e
No known key found for this signature in database
GPG Key ID: B538286DE04ECFE5

View File

@ -236,7 +236,7 @@ int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent,
*sent = 0; *sent = 0;
if (*ps == SOCKET_INVALID) return IO_CLOSED; if (*ps == SOCKET_INVALID) return IO_CLOSED;
for ( ;; ) { for ( ;; ) {
long put = (long) sendto(*ps, data, count, 0, addr, len); long put = (long) sendto(*ps, data, count, 0, addr, len);
if (put >= 0) { if (put >= 0) {
*sent = put; *sent = put;
return IO_DONE; return IO_DONE;
@ -403,7 +403,7 @@ const char *socket_hoststrerror(int err) {
if (err <= 0) return io_strerror(err); if (err <= 0) return io_strerror(err);
switch (err) { switch (err) {
case HOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; case HOST_NOT_FOUND: return PIE_HOST_NOT_FOUND;
default: return hstrerror(err); default: return strerror(err);
} }
} }