Skip to content

Commit 1c31596

Browse files
Ramsay Jonesgitster
authored andcommitted
compat/poll/poll.c: Fix a sparse warning
Sparse issues an 'Using plain integer as NULL pointer' warning when passing the constant '0' as the second parameter in the call to the WSAEventSelect() function. The function parameter has a pointer type (WSAEVENT, aka HANDLE, aka void *) so that, in order to suppress the warning, we simply pass NULL for that parameter in the function call expression. Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9c3b051 commit 1c31596

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/poll/poll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
576576
{
577577
/* It's a socket. */
578578
WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev);
579-
WSAEventSelect ((SOCKET) h, 0, 0);
579+
WSAEventSelect ((SOCKET) h, NULL, 0);
580580

581581
/* If we're lucky, WSAEnumNetworkEvents already provided a way
582582
to distinguish FD_READ and FD_ACCEPT; this saves a recv later. */

0 commit comments

Comments
 (0)