mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
replace leading spaces with tabs
Change-Id: I86783eba0827b58303b10310e9f6b9625e1a27f1
This commit is contained in:
@@ -65,41 +65,41 @@
|
||||
// Definitions
|
||||
//------------------------------------------------------------------------------
|
||||
#if defined(NOASSERT)
|
||||
#define ASSERT(...)
|
||||
#define SANITY_CHECK(...)
|
||||
#define ASSERT(...)
|
||||
#define SANITY_CHECK(...)
|
||||
#else
|
||||
|
||||
#if (TRACE_LEVEL == 0)
|
||||
/// Checks that the given condition is true,
|
||||
/// otherwise stops the program execution.
|
||||
/// \param condition Condition to verify.
|
||||
#define ASSERT(condition) { \
|
||||
if (!(condition)) { \
|
||||
while (1); \
|
||||
} \
|
||||
}
|
||||
#if (TRACE_LEVEL == 0)
|
||||
/// Checks that the given condition is true,
|
||||
/// otherwise stops the program execution.
|
||||
/// \param condition Condition to verify.
|
||||
#define ASSERT(condition) { \
|
||||
if (!(condition)) { \
|
||||
while (1); \
|
||||
} \
|
||||
}
|
||||
|
||||
/// Performs the same duty as the ASSERT() macro
|
||||
/// \param condition Condition to verify.
|
||||
#define SANITY_CHECK(condition) ASSERT(condition, ...)
|
||||
/// Performs the same duty as the ASSERT() macro
|
||||
/// \param condition Condition to verify.
|
||||
#define SANITY_CHECK(condition) ASSERT(condition, ...)
|
||||
|
||||
#else
|
||||
/// Checks that the given condition is true, otherwise displays an error
|
||||
/// message and stops the program execution.
|
||||
/// \param condition Condition to verify.
|
||||
#define ASSERT(condition) { \
|
||||
if (!(condition)) { \
|
||||
printf("-F- ASSERT: %s %s:%d\n\r", #condition, __BASE_FILE__, __LINE__); \
|
||||
while (1); \
|
||||
} \
|
||||
}
|
||||
#define SANITY_ERROR "Sanity check failed at %s:%d\n\r"
|
||||
|
||||
/// Performs the same duty as the ASSERT() macro, except a default error
|
||||
/// message is output if the condition is false.
|
||||
/// \param condition Condition to verify.
|
||||
#define SANITY_CHECK(condition) ASSERT(condition, SANITY_ERROR, __FILE__, __LINE__)
|
||||
#endif
|
||||
#else
|
||||
/// Checks that the given condition is true, otherwise displays an error
|
||||
/// message and stops the program execution.
|
||||
/// \param condition Condition to verify.
|
||||
#define ASSERT(condition) { \
|
||||
if (!(condition)) { \
|
||||
printf("-F- ASSERT: %s %s:%d\n\r", #condition, __BASE_FILE__, __LINE__); \
|
||||
while (1); \
|
||||
} \
|
||||
}
|
||||
#define SANITY_ERROR "Sanity check failed at %s:%d\n\r"
|
||||
|
||||
/// Performs the same duty as the ASSERT() macro, except a default error
|
||||
/// message is output if the condition is false.
|
||||
/// \param condition Condition to verify.
|
||||
#define SANITY_CHECK(condition) ASSERT(condition, SANITY_ERROR, __FILE__, __LINE__)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user