add WL_TBM_GOTO_IF_FAIL macro 49/54149/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 4 Dec 2015 12:32:28 +0000 (21:32 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 7 Dec 2015 07:47:50 +0000 (16:47 +0900)
Change-Id: I5e787a3f35605b4483b2092483ed354f20014dcb

src/wayland-tbm-int.h

index c23f569..301b6d6 100644 (file)
@@ -49,6 +49,12 @@ extern "C" {
         return val;\
     }\
 }
+#define WL_TBM_GOTO_IF_FAIL(cond, dst) {\
+    if (!(cond)) {\
+        WL_TBM_LOG ("[%s] : '%s' failed.\n", __FUNCTION__, #cond);\
+        goto dst;\
+    }\
+}
 
 /* internal functions */
 int32_t        _wayland_tbm_client_get_auth_fd(struct wayland_tbm_client *tbm_client);