{"thread":{"id":"33646","subject":"[PATCH 3/6] compat/poll/poll.c: Fix a sparse warning","startedAt":"2013-04-27T19:17:14Z","lastAt":"2013-04-27T19:17:14Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"215730","messageId":"517C243A.20702@ramsay1.demon.co.uk","threadId":"33646","inReplyTo":null,"subject":"[PATCH 3/6] compat/poll/poll.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-04-27T19:17:14Z","receivedAt":"2013-04-27T19:17:14Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSparse issues an 'Using plain integer as NULL pointer' warning when\npassing the constant '0' as the second parameter in the call to the\nWSAEventSelect() function. The function parameter has a pointer type\n(WSAEVENT, aka HANDLE, aka void *) so that, in order to suppress the\nwarning, we simply pass NULL for that parameter in the function call\nexpression.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n compat/poll/poll.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/poll/poll.c b/compat/poll/poll.c\nindex 7d226ec..4410310 100644\n--- a/compat/poll/poll.c\n+++ b/compat/poll/poll.c\n@@ -576,7 +576,7 @@ restart:\n \t{\n \t  /* It's a socket.  */\n \t  WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev);\n-\t  WSAEventSelect ((SOCKET) h, 0, 0);\n+\t  WSAEventSelect ((SOCKET) h, NULL, 0);\n \n \t  /* If we're lucky, WSAEnumNetworkEvents already provided a way\n \t     to distinguish FD_READ and FD_ACCEPT; this saves a recv later.  */\n-- \n1.8.2\n"}]}