#define EXEC(error_code, command) do { \
if (error_code != command) { \
__STC_LOG_FUNC_EXIT__; \
- goto handle_error; \
+ return false; \
} \
} while (0)
#define ret_msg_if(expr, fmt, arg...) do { \
if (expr) { \
- STC_LOGE(fmt, ##arg); \
+ if (STC_DEBUG_LOG) \
+ STC_LOGD(fmt, ##arg); \
return; \
} \
} while (0)
#define ret_value_msg_if(expr, val, fmt, arg...) do { \
if (expr) { \
if (STC_DEBUG_LOG) \
- STC_LOGE(fmt, ##arg); \
+ STC_LOGD(fmt, ##arg); \
return val; \
} \
} while (0)
-#define ret_value_errno_msg_if(expr, val, fmt, arg...) do { \
- if (expr) { \
- if (STC_DEBUG_LOG) \
- STC_LOGE(fmt, ##arg); \
- return val; \
- } \
-} while (0)
-
-
/*
* @brief Copy from source to destination
* destination should not be on heap.