mirror of
https://frontier.innolan.net/rainlance/c-ares.git
synced 2026-10-06 09:24:59 +00:00
curlassert macro replaced with DEBUGASSERT macro defined in setup_once.h
This commit is contained in:
+1
-1
@@ -46,6 +46,6 @@ const char *ares_strerror(int code)
|
|||||||
"Illegal hints flags specified"
|
"Illegal hints flags specified"
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
|
DEBUGASSERT(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
|
||||||
return errtext[code];
|
return errtext[code];
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-2
@@ -200,9 +200,20 @@ typedef int sig_atomic_t;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CURLDEBUG
|
#ifdef CURLDEBUG
|
||||||
#define DEBUGF(X) X
|
#define DEBUGF(x) x
|
||||||
#else
|
#else
|
||||||
#define DEBUGF(X) do { } while (0)
|
#define DEBUGF(x) do { } while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Macro used to include assertion code only in debug builds.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
|
||||||
|
#define DEBUGASSERT(x) assert(x)
|
||||||
|
#else
|
||||||
|
#define DEBUGASSERT(x) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user