]> granicus.if.org Git - python/commit
socket: use INVALID_SOCKET
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 22 Jul 2016 15:43:59 +0000 (17:43 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 22 Jul 2016 15:43:59 +0000 (17:43 +0200)
commit524714eeda70de01046e3b4736516f41d7d11010
treece1ee1d3cfad2a646f46d1581a677ba4c4ccde4f
parent0cec877230a9232378eb2c7e21348029bbe83fea
socket: use INVALID_SOCKET

* Replace "fd = -1" with "fd = INVALID_SOCKET"
* Replace "fd < 0" with "fd == INVALID_SOCKET": SOCKET_T is unsigned on Windows

Bug found by Pavel Belikov ("Fragment N1"):
http://www.viva64.com/en/b/0414/#ID0ECDAE
Modules/_ssl.c
Modules/socketmodule.c