Skip to content

Display and control your Android device

Fix WSAStartup() error check on Windows

Romain Vimont0cea7fb24cf8
diff --git a/app/src/util/net.c b/app/src/util/net.c
index ed4882cd..c762a10f 100644
--- a/app/src/util/net.c
+++ b/app/src/util/net.c
@@ -30,8 +30,8 @@ bool
net_init(void) {
#ifdef _WIN32
WSADATA wsa;
- int res = WSAStartup(MAKEWORD(2, 2), &wsa) < 0;
- if (res < 0) {
+ int res = WSAStartup(MAKEWORD(2, 2), &wsa);
+ if (res) {
LOGE("WSAStartup failed with error %d", res);
return false;
}