]> git.ipfire.org Git - thirdparty/git.git/commitdiff
compat/poll/poll.c: Fix a sparse warning
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Sat, 27 Apr 2013 19:17:14 +0000 (20:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Apr 2013 19:27:04 +0000 (12:27 -0700)
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 <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/poll/poll.c

index 7d226ecb293ee3c5f9b17aa3e5e36b7c8701dbae..44103103a4a71ff25e5e8e1d106221a9dd2e9908 100644 (file)
@@ -576,7 +576,7 @@ restart:
        {
          /* It's a socket.  */
          WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev);
-         WSAEventSelect ((SOCKET) h, 0, 0);
+         WSAEventSelect ((SOCKET) h, NULL, 0);
 
          /* If we're lucky, WSAEnumNetworkEvents already provided a way
             to distinguish FD_READ and FD_ACCEPT; this saves a recv later.  */