Skip to content

Commit

Permalink
select: use correct SIZEOF_ constant
Browse files Browse the repository at this point in the history
At least under Windows, there is no SIZEOF_LONG, so it evaluates to 0 even
though sizeof(int) == sizeof(long). This should probably have been
CURL_SIZEOF_LONG, but the type of timeout_ms changed from long to time_t
anyway.
This triggered MSVC warning C4668 about implicitly replacing undefined
macros with '0'.

Closes #1362
  • Loading branch information
MarcelRaad committed Mar 30, 2017
1 parent f895293 commit 1b4b2c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/select.c
Expand Up @@ -164,7 +164,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
int r;
int ret;

#if SIZEOF_LONG != SIZEOF_INT
#if SIZEOF_TIME_T != SIZEOF_INT
/* wrap-around precaution */
if(timeout_ms >= INT_MAX)
timeout_ms = INT_MAX;
Expand Down

0 comments on commit 1b4b2c1

Please sign in to comment.