Skip to content

Commit a1797f0

Browse files
author
Andras Fekete
committed
Fix casts depending on OS
1 parent a59a3d1 commit a1797f0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/client/client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
801801
if (exitWithRet)
802802
return err;
803803

804-
#ifdef __MINGW32__
804+
#if defined(__MINGW32__) || defined(_WIN32)
805805
#define SIZE_FMT "%d"
806806
#define SIZE_TYPE int
807807
#else
@@ -852,7 +852,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
852852
}
853853

854854
/* C: EHLO mail.example.com */
855-
if (send(*sockfd, starttlsCmd[1], XSTRLEN(starttlsCmd[1]), 0) !=
855+
if (send(*sockfd, starttlsCmd[1], (SIZE_TYPE)XSTRLEN(starttlsCmd[1]), 0) !=
856856
(int)XSTRLEN(starttlsCmd[1]))
857857
err_sys("failed to send STARTTLS EHLO command\n");
858858

@@ -869,7 +869,7 @@ static int StartTLS_Init(SOCKET_T* sockfd)
869869
}
870870

871871
/* C: STARTTLS */
872-
if (send(*sockfd, starttlsCmd[3], XSTRLEN(starttlsCmd[3]), 0) !=
872+
if (send(*sockfd, starttlsCmd[3], (SIZE_TYPE)XSTRLEN(starttlsCmd[3]), 0) !=
873873
(int)XSTRLEN(starttlsCmd[3])) {
874874
err_sys("failed to send STARTTLS command\n");
875875
}

0 commit comments

Comments
 (0)