log: move the condition check to tbm_log.h 91/173091/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 19 Mar 2018 11:55:21 +0000 (20:55 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 19 Mar 2018 11:55:21 +0000 (20:55 +0900)
Change-Id: I84d581810190d98d6c4075154d847c6736346055

src/tbm_bufmgr_int.h
src/tbm_log.h

index c47067ccbd8bc8b1bf20affce89570510c9f5907..33eccd2e0664a7e64c988581570036c750041c14 100644 (file)
@@ -62,26 +62,6 @@ extern tbm_bufmgr gBufMgr;
 extern int b_dump_queue;
 extern int trace_mask;
 
-/* check condition */
-#define TBM_RETURN_IF_FAIL(cond) {\
-       if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
-               return;\
-       } \
-}
-#define TBM_RETURN_VAL_IF_FAIL(cond, val) {\
-       if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
-               return val;\
-       } \
-}
-#define TBM_GOTO_VAL_IF_FAIL(cond, val) {\
-       if (!(cond)) {\
-               TBM_ERR("'%s' failed.\n", #cond);\
-               goto val;\
-       } \
-}
-
 /* check flags */
 #define RETURN_CHECK_FLAG(cond) {\
        if ((cond)) {\
index 97a819c11cb076e49bf9d1d59b9abde462ff2383..ae5dd7637ce86e089a26310f21c502546d5deebc 100644 (file)
@@ -106,6 +106,26 @@ void tbm_log_reset(void);
                        TBM_WRN("** DEPRECATED **"); \
        } while(0)
 
+/* check condition */
+#define TBM_RETURN_IF_FAIL(cond) {\
+       if (!(cond)) {\
+               TBM_ERR("'%s' failed.\n", #cond);\
+               return;\
+       } \
+}
+#define TBM_RETURN_VAL_IF_FAIL(cond, val) {\
+       if (!(cond)) {\
+               TBM_ERR("'%s' failed.\n", #cond);\
+               return val;\
+       } \
+}
+#define TBM_GOTO_VAL_IF_FAIL(cond, val) {\
+       if (!(cond)) {\
+               TBM_ERR("'%s' failed.\n", #cond);\
+               goto val;\
+       } \
+}
+
 #ifdef __cplusplus
 }
 #endif