projects
/
platform
/
core
/
uifw
/
libtbm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
985dba7
)
tbm_log: add the condition check macro with error
83/259883/1
author
SooChan Lim
<sc1.lim@samsung.com>
Fri, 11 Jun 2021 08:06:15 +0000
(17:06 +0900)
committer
SooChan Lim
<sc1.lim@samsung.com>
Tue, 15 Jun 2021 09:01:50 +0000
(18:01 +0900)
Change-Id: I064a9d7588a4d8ec0f02fa5da770b5c12c3bbcb6
include/tbm_log.h
patch
|
blob
|
history
diff --git
a/include/tbm_log.h
b/include/tbm_log.h
index
9f724cc
..
d37c351
100644
(file)
--- a/
include/tbm_log.h
+++ b/
include/tbm_log.h
@@
-133,6
+133,22
@@
void tbm_log_print_stdout(int level, const char *fmt, ...);
} \
}
+#define TBM_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ error = error_type;\
+ return;\
+ } \
+}
+
+#define TBM_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
+ if (!(cond)) {\
+ TBM_ERR("'%s' failed.\n", #cond);\
+ error = error_type;\
+ return val;\
+ } \
+}
+
#ifdef __cplusplus
}
#endif