[0.2.56] modify macro to make it regular statement 18/133418/2
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 12 Jun 2017 06:51:06 +0000 (15:51 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 12 Jun 2017 06:54:31 +0000 (15:54 +0900)
Change-Id: I8ab75c48af4fff86d4aa7ef1f0eeee96df482870

legacy/include/legacy_player_private.h
packaging/mmsvc-player.spec

index 005bfdfd30ee4619ae7e58da4b95ff5d20f30f5c..ac3610966cb1afdcfb8fd1be86027840bced9137 100644 (file)
@@ -32,8 +32,10 @@ extern "C" {
 //#define USE_ECORE_FUNCTIONS
 
 #define PLAYER_CHECK_CONDITION(condition, error, msg)     \
+do {   \
        if (condition) {} else \
-       { LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); return error; }; \
+       { LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); return error; } \
+} while (0)
 
 #define PLAYER_INSTANCE_CHECK(player)   \
        PLAYER_CHECK_CONDITION(player != NULL, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER")
@@ -45,8 +47,10 @@ extern "C" {
        PLAYER_CHECK_CONDITION(arg != NULL, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER")
 
 #define PLAYER_RANGE_ARG_CHECK(arg, min, max)      \
-       PLAYER_CHECK_CONDITION(arg <= max, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER")            \
-       PLAYER_CHECK_CONDITION(arg >= min, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER")
+do {   \
+       PLAYER_CHECK_CONDITION(arg <= max, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");   \
+       PLAYER_CHECK_CONDITION(arg >= min, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");   \
+} while (0)
 
 /* user_cb_lock */
 #define LEGACY_PLAYER_USER_CB_LOCK(x_handle, type) \
index 73729be8bb9c652fbbb2e1de317a3b06495459a6..ff5957f75fddf42d7ea5bd3c441f7d3549217f15 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.55
+Version:    0.2.56
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0