Apply tizen coding rule 92/74492/1 accepted/tizen/common/20160615.193431 accepted/tizen/ivi/20160615.001908 accepted/tizen/mobile/20160615.001944 accepted/tizen/tv/20160615.001919 accepted/tizen/wearable/20160615.001925 submit/tizen/20160614.113418
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Jun 2016 10:25:17 +0000 (19:25 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 14 Jun 2016 10:25:17 +0000 (19:25 +0900)
Change-Id: I413bac301b4d50cf82b239a31dcc02516c0ade08

src/tbm_bufmgr.c
src/tbm_bufmgr_backend.c
src/tbm_bufmgr_int.h
src/tbm_surface.h
src/tbm_surface_queue.c
src/tbm_surface_queue.h

index e115b5f..a060584 100644 (file)
@@ -182,11 +182,10 @@ _bo_lock(tbm_bo bo, int device, int opt)
        tbm_bufmgr bufmgr = bo->bufmgr;
        int ret = 0;
 
-       if (bufmgr->backend->bo_lock) {
+       if (bufmgr->backend->bo_lock)
                ret = bufmgr->backend->bo_lock(bo, device, opt);
-       } else {
+       else
                ret = 1;
-       }
 
        return ret;
 }
@@ -196,9 +195,8 @@ _bo_unlock(tbm_bo bo)
 {
        tbm_bufmgr bufmgr = bo->bufmgr;
 
-       if (bufmgr->backend->bo_unlock) {
+       if (bufmgr->backend->bo_unlock)
                bufmgr->backend->bo_unlock(bo);
-       }
 }
 
 static int
@@ -1302,4 +1300,4 @@ tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *NativeDisplay)
 
        return 1;
 }
-/* LCOV_EXCL_STOP */
\ No newline at end of file
+/* LCOV_EXCL_STOP */
index f2fa37e..0f81cb0 100644 (file)
@@ -109,4 +109,4 @@ int tbm_backend_is_display_server(void)
 
        return 1;
 }
-/* LCOV_EXCL_STOP */
\ No newline at end of file
+/* LCOV_EXCL_STOP */
index 3cb5bb1..6275005 100644 (file)
@@ -55,8 +55,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifdef DEBUG
 extern int bDebug;
 
-#define DBG(...) {if (bDebug&0x1) TBM_LOG_D(__VA_ARGS__);}
-#define DBG_LOCK(...) {if (bDebug&0x2) TBM_LOG_D(__VA_ARGS__);}
+#define DBG(...) { if (bDebug&0x1) TBM_LOG_D(__VA_ARGS__); }
+#define DBG_LOCK(...) { if (bDebug&0x2) TBM_LOG_D(__VA_ARGS__); }
 #else
 #define DBG(...)
 #define DBG_LOCK(...)
index c758be6..0686a4e 100644 (file)
@@ -472,14 +472,14 @@ extern "C" {
    uint32_t *formats;
    uint32_t format_num;
    int ret, i;
+   tbm_surface_error_e tse;
 
-   if (tbm_surface_query_formats (&formats, &format_num))
+   tse = tbm_surface_query_formats (&formats, &format_num))
+
+   for( i = 0 ; i < format_num ; i++)
    {
-       for( i = 0 ; i < format_num ; i++)
+       if (formats[i] == TBM_FORMAT_RGB332)
        {
-           if (formats[i] == TBM_FORMAT_RGB332)
-           {
-
    ....
 
    free (formats);
index cfb3f1a..164c28a 100644 (file)
@@ -971,9 +971,9 @@ tbm_surface_queue_get_surfaces(tbm_surface_queue_h surface_queue,
 
        *num = 0;
        LIST_FOR_EACH_ENTRY_SAFE(node, tmp, &surface_queue->list, link) {
-               if (surfaces) {
+               if (surfaces)
                        surfaces[*num] = node->surface;
-               }
+
                *num = *num + 1;
        }
 
index 8803a60..e90d82a 100644 (file)
@@ -45,13 +45,13 @@ typedef enum {
 
 typedef struct _tbm_surface_queue *tbm_surface_queue_h;
 
-typedef void (*tbm_surface_queue_notify_cb) (tbm_surface_queue_h surface_queue,
+typedef void (*tbm_surface_queue_notify_cb)(tbm_surface_queue_h surface_queue,
                void *data);
 
-typedef tbm_surface_h (*tbm_surface_alloc_cb) (tbm_surface_queue_h surface_queue,
+typedef tbm_surface_h (*tbm_surface_alloc_cb)(tbm_surface_queue_h surface_queue,
                void *data);
 
-typedef void (*tbm_surface_free_cb) (tbm_surface_queue_h surface_queue,
+typedef void (*tbm_surface_free_cb)(tbm_surface_queue_h surface_queue,
                void *data, tbm_surface_h surface);
 
 #ifdef __cplusplus