mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Fix casts depending on OS
This commit is contained in:
@@ -801,7 +801,7 @@ doExit:
|
|||||||
if (exitWithRet)
|
if (exitWithRet)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__) || defined(_WIN32)
|
||||||
#define SIZE_FMT "%d"
|
#define SIZE_FMT "%d"
|
||||||
#define SIZE_TYPE int
|
#define SIZE_TYPE int
|
||||||
#else
|
#else
|
||||||
@@ -852,7 +852,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* C: EHLO mail.example.com */
|
/* C: EHLO mail.example.com */
|
||||||
if (send(*sockfd, starttlsCmd[1], XSTRLEN(starttlsCmd[1]), 0) !=
|
if (send(*sockfd, starttlsCmd[1], (SIZE_TYPE)XSTRLEN(starttlsCmd[1]), 0) !=
|
||||||
(int)XSTRLEN(starttlsCmd[1]))
|
(int)XSTRLEN(starttlsCmd[1]))
|
||||||
err_sys("failed to send STARTTLS EHLO command\n");
|
err_sys("failed to send STARTTLS EHLO command\n");
|
||||||
|
|
||||||
@@ -869,7 +869,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* C: STARTTLS */
|
/* C: STARTTLS */
|
||||||
if (send(*sockfd, starttlsCmd[3], XSTRLEN(starttlsCmd[3]), 0) !=
|
if (send(*sockfd, starttlsCmd[3], (SIZE_TYPE)XSTRLEN(starttlsCmd[3]), 0) !=
|
||||||
(int)XSTRLEN(starttlsCmd[3])) {
|
(int)XSTRLEN(starttlsCmd[3])) {
|
||||||
err_sys("failed to send STARTTLS command\n");
|
err_sys("failed to send STARTTLS command\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user