diff options
author | Joerg Mayer <jmayer@loplof.de> | 2018-04-01 21:41:52 +0200 |
---|---|---|
committer | Joerg Mayer <jmayer@loplof.de> | 2018-04-01 22:51:39 +0200 |
commit | ca9ec572bd0366c7e137f1873c2def1c283fd51d (patch) | |
tree | d3764cade7be9e1c372d68bd9b6f19f7343ccdd9 /sockutils.h | |
parent | b2604e87c5f39777c120201ae04d5f31195aad31 (diff) |
Rename SOCK_ASSERT to SOCK_MESSAGE
SOCK_ASSERT was always called with a true expression ("1") thus only ever executing the message part.
Rename the macro, remove the assert part and remove the "1" parameter.
Diffstat (limited to 'sockutils.h')
-rw-r--r-- | sockutils.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sockutils.h b/sockutils.h index 642ec43b..6c7198df 100644 --- a/sockutils.h +++ b/sockutils.h @@ -139,16 +139,15 @@ int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, * \return No return values. */ #ifdef NDEBUG - #define SOCK_ASSERT(msg, expr) ((void)0) + #define SOCK_MESSAGE(msg) ((void)0) #else - #include <assert.h> #if (defined(_WIN32) && defined(_MSC_VER)) #include <crtdbg.h> /* for _CrtDbgReport */ /* Use MessageBox(NULL, msg, "warning", MB_OK)' instead of the other calls if you want to debug a Win32 service */ /* Remember to activate the 'allow service to interact with desktop' flag of the service */ - #define SOCK_ASSERT(msg, expr) { _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%s\n", msg); fprintf(stderr, "%s\n", msg); assert(expr); } + #define SOCK_MESSAGE(msg) { _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%s\n", msg); fprintf(stderr, "%s\n", msg); } #else - #define SOCK_ASSERT(msg, expr) { fprintf(stderr, "%s\n", msg); assert(expr); } + #define SOCK_MESSAGE(msg) { fprintf(stderr, "%s\n", msg); } #endif #endif |