From 16e31d4fd6fa7c437bbcd013f99fcacb3bf536d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Mon, 28 Oct 2019 12:43:03 +0000 Subject: [PATCH] windows: Fix ioctl result check polarity --- lib/plat/windows/windows-sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plat/windows/windows-sockets.c b/lib/plat/windows/windows-sockets.c index 065d5c245..38910fcc5 100644 --- a/lib/plat/windows/windows-sockets.c +++ b/lib/plat/windows/windows-sockets.c @@ -47,7 +47,7 @@ lws_plat_set_nonblocking(int fd) { u_long optl = 1; int result = !!ioctlsocket(fd, FIONBIO, &optl); - if (!result) + if (result) { int error = LWS_ERRNO; lwsl_err("ioctlsocket FIONBIO 1 failed with error %d\n", error);