From: Boram Park Date: Fri, 18 Sep 2015 08:23:21 +0000 (+0900) Subject: export_fd returns negative value if fail X-Git-Tag: accepted/tizen/mobile/20150921.090205~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=868d6b16f41824b75efec82f94209c2ace8a781c;p=platform%2Fcore%2Fuifw%2Flibtbm.git export_fd returns negative value if fail Change-Id: Ide1d1706745e0f8ccde7c4e6a2d1d5c52af947d4 --- diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 61e5a70..a04780c 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -1390,7 +1390,7 @@ tbm_bo_export (tbm_bo bo) tbm_fd tbm_bo_export_fd (tbm_bo bo) { - TBM_RETURN_VAL_IF_FAIL (_tbm_bo_is_valid(bo), 0); + TBM_RETURN_VAL_IF_FAIL (_tbm_bo_is_valid(bo), -1); tbm_bufmgr bufmgr; int ret; @@ -1399,7 +1399,7 @@ tbm_bo_export_fd (tbm_bo bo) pthread_mutex_lock (&bufmgr->lock); ret = bufmgr->backend->bo_export_fd (bo); - if (!ret) + if (ret < 0) { _tbm_set_last_result (TBM_BO_ERROR_EXPORT_FD_FAILED); pthread_mutex_unlock (&bufmgr->lock);