ws2_32: Avoid UINT32_MAX.

This commit is contained in:
Alexandre Julliard 2015-05-01 15:45:11 +09:00
parent 27de4f25cf
commit 57e2d9ef75
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <limits.h>
#ifdef HAVE_SYS_IPC_H #ifdef HAVE_SYS_IPC_H
# include <sys/ipc.h> # include <sys/ipc.h>
#endif #endif
@ -3633,7 +3634,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
return SOCKET_ERROR; return SOCKET_ERROR;
timeout = get_rcvsnd_timeo(fd, optname == WS_SO_RCVTIMEO); timeout = get_rcvsnd_timeo(fd, optname == WS_SO_RCVTIMEO);
*(int *)optval = timeout <= UINT32_MAX ? timeout : UINT32_MAX; *(int *)optval = timeout <= UINT_MAX ? timeout : UINT_MAX;
release_sock_fd( s, fd ); release_sock_fd( s, fd );
return ret; return ret;