From 2bd14f2904c711c32e344157f1c5fd6574c812e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= <112760654+DaniElectra@users.noreply.github.com> Date: Sat, 15 Jun 2024 17:53:17 +0200 Subject: [PATCH] chore: Minor code improvements --- events.cpp | 2 +- winsock2.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/events.cpp b/events.cpp index adeadb8..592cabd 100755 --- a/events.cpp +++ b/events.cpp @@ -97,7 +97,7 @@ int StartupEvents() { // Register the main window class wc.style = 0; - wc.lpfnWndProc = (WNDPROC)EventsWndProc; + wc.lpfnWndProc = EventsWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = events_instance; diff --git a/winsock2.cpp b/winsock2.cpp index 259d6fc..63bfc60 100755 --- a/winsock2.cpp +++ b/winsock2.cpp @@ -11,6 +11,7 @@ void DebugLog(const char* fmt, ...) { va_end(args); MessageBox(NULL, buf, "WINSOCK351", 0); + delete buf; } #else #define DebugLog @@ -28,8 +29,7 @@ int WSAAPI WINSOCK351_ioctlsocket(SOCKET s, long cmd, u_long* argp) { return ioctlsocket(s, cmd, argp); } -int WSAAPI WINSOCK351_select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const timeval* timeout) - { +int WSAAPI WINSOCK351_select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const timeval* timeout) { DebugLog("select: nfds: %d, timeout: %d", nfds, timeout != NULL ? timeout->tv_sec * 1000000 + timeout->tv_usec : 0); return select(nfds, readfds, writefds, exceptfds, timeout); }