Fix - Coding rule 47/80047/1 accepted/tizen/common/20160715.175631 accepted/tizen/ivi/20160717.034945 accepted/tizen/mobile/20160717.034937 accepted/tizen/tv/20160717.034823 accepted/tizen/wearable/20160717.034839 submit/tizen/20160715.103558
authorstom.hwang <stom.hwang@samsung.com>
Thu, 14 Jul 2016 07:57:54 +0000 (16:57 +0900)
committerstom.hwang <stom.hwang@samsung.com>
Thu, 14 Jul 2016 07:57:54 +0000 (16:57 +0900)
Change-Id: I86fdafc6db812191d809a7903f7e1748f073f545
Signed-off-by: stom.hwang <stom.hwang@samsung.com>
client/vc.c
client/vc_mgr.c
client/vc_mgr_dbus.c
common/vc_command.c
common/vc_info_parser.c
include/voice_control_manager.h
include/voice_control_plugin_engine.h
server/vcd_recorder.c
server/vcd_server.c

index 7410708..7ddecc3 100644 (file)
@@ -133,7 +133,7 @@ static int __vc_check_privilege()
                SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied");
                return VC_ERROR_PERMISSION_DENIED;
        } else if (-1 == g_privilege_allowed) {
-               if (false == __check_privilege_initialize()){
+               if (false == __check_privilege_initialize()) {
                        SLOG(LOG_ERROR, TAG_VCC, "[ERROR] privilege initialize is failed");
                        return VC_ERROR_PERMISSION_DENIED;
                }
index 0623886..e3a2f21 100644 (file)
@@ -1497,7 +1497,7 @@ int vc_mgr_get_nlp_info(char** info)
 
 int vc_mgr_set_pre_result_cb(vc_mgr_pre_result_cb callback, void* user_data)
 {
-       if (NULL == callback){
+       if (NULL == callback) {
                SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Set error callback : callback is NULL");
                return VC_ERROR_INVALID_PARAMETER;
        }
index 40f345e..93f4efd 100644 (file)
@@ -240,8 +240,7 @@ static Eina_Bool vc_mgr_listener_event_callback(void* data, Ecore_Fd_Handler *fd
                        if (dbus_error_is_set(&err)) {
                                SLOG(LOG_ERROR, TAG_VCM, "<<<< vc mgr Get Error message : Get arguments error (%s)", err.message);
                                dbus_error_free(&err);
-                       }
-                       else {
+                       } else {
                                SLOG(LOG_ERROR, TAG_VCM, "<<<< vc mgr Get Error message : reason(%d), daemon_pid(%d), msg(%s)", reason, daemon_pid, err_msg);
                                __vc_mgr_cb_error(reason, daemon_pid, err_msg);
                        }
index c42e84e..ef433d4 100644 (file)
@@ -110,13 +110,13 @@ static void __check_privilege_deinitialize()
 
 static int __vc_cmd_check_privilege()
 {
-        char uid[16];
+       char uid[16];
 
        if (0 == g_privilege_allowed) {
                SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied");
                return VC_ERROR_PERMISSION_DENIED;
        } else if (-1 == g_privilege_allowed) {
-               if (false == __check_privilege_initialize()){
+               if (false == __check_privilege_initialize()) {
                        SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] privilege initialize is failed");
                        return VC_ERROR_PERMISSION_DENIED;
                }
@@ -454,7 +454,7 @@ int vc_cmd_list_filter_by_type(vc_cmd_list_h original, int type, vc_cmd_list_h*
                        if (NULL != iter_cmd) {
                                int iter_type;
                                if (0 != vc_cmd_get_type((vc_cmd_h)iter_cmd, &iter_type)) {
-                                       SLOG(LOG_ERROR,TAG_VCCMD, "[ERROR] Fail to get command type");
+                                       SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Fail to get command type");
                                        continue;
                                }
 
index 3b6095b..1f098f1 100644 (file)
@@ -1278,19 +1278,19 @@ int vc_info_parser_get_nlp_info(char** nlp_info)
        }
 
        SLOG(LOG_DEBUG, vc_info_tag(), "[DEBUG] buffer size (%d)", readn);
-    if (10000000 < readn || 0 > readn) {
-        SLOG(LOG_DEBUG, vc_info_tag(), "[ERROR] Invalid buffer size");
-        fclose(fp);
-        return -1;
-    }
-    int tmp_readn = readn + 10;
+       if (10000000 < readn || 0 > readn) {
+               SLOG(LOG_DEBUG, vc_info_tag(), "[ERROR] Invalid buffer size");
+               fclose(fp);
+               return -1;
+       }
+       int tmp_readn = readn + 10;
 
        *nlp_info = (char*)calloc(tmp_readn, sizeof(char));
-    if (NULL == *nlp_info) {
-        SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Out of memory");
-        fclose(fp);
-        return -1;
-    }
+       if (NULL == *nlp_info) {
+               SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Out of memory");
+               fclose(fp);
+               return -1;
+       }
 
        readn = fread(*nlp_info, 1, readn, fp);
        fclose(fp);
index 6cb1829..e6d80a4 100644 (file)
@@ -117,7 +117,7 @@ typedef enum {
        VC_PRE_RESULT_EVENT_FINAL_RESULT = 0,
        VC_PRE_RESULT_EVENT_PARTIAL_RESULT,
        VC_PRE_RESULT_EVENT_ERROR
-}vc_pre_result_event_e;
+} vc_pre_result_event_e;
 
 // support pre-result
 typedef bool(*vc_mgr_pre_result_cb)(vc_pre_result_event_e event, const char* result, void *user_data);
index c4322ea..0524a8c 100644 (file)
@@ -127,7 +127,7 @@ typedef enum {
        VCP_PRE_RESULT_EVENT_FINAL_RESULT = 0,
        VCP_PRE_RESULT_EVENT_PARTIAL_RESULT,
        VCP_PRE_RESULT_EVENT_ERROR
-}vcp_pre_result_event_e;
+} vcp_pre_result_event_e;
 
 // Add new
 typedef void (*vcpe_pre_result_cb)(vcp_pre_result_event_e event, const char* pre_result, void *user_data);
index 5e7f0d0..4996cea 100644 (file)
@@ -542,8 +542,7 @@ int vcd_recorder_start()
 
                        g_bt_extend_count = 0;
 #endif
-               }
-               else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
+               } else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
                        SLOG(LOG_ERROR, TAG_VCD, "[Recorder] call RegisterMSFAudioCallback() function");
 #ifdef TV_MSF_WIFI_MODE
 
@@ -633,8 +632,7 @@ int vcd_recorder_stop()
                                return VCD_ERROR_OPERATION_FAILED;
                        }
 #endif
-               }
-               else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
+               } else if (0 == strncmp(VCP_AUDIO_ID_MSF, g_current_audio_type, strlen(VCP_AUDIO_ID_MSF))) {
 #ifdef TV_MSF_WIFI_MODE
                        UnRegisterMSFAudioCallback();
                        stoped = true;
index 748e548..e8ea19e 100644 (file)
@@ -257,13 +257,13 @@ static Eina_Bool __vcd_send_selected_result(void *data)
 static int __convert_type_to_priority(vc_cmd_type_e type)
 {
        switch (type) {
-               case VC_COMMAND_TYPE_NONE:              return 0;
-               case VC_COMMAND_TYPE_BACKGROUND:        return 1;
-               case VC_COMMAND_TYPE_FOREGROUND:        return 2;
-               case VC_COMMAND_TYPE_WIDGET:            return 2;
-               case VC_COMMAND_TYPE_SYSTEM:            return 3;
-               case VC_COMMAND_TYPE_EXCLUSIVE:         return 3;
-               default:                                return 0;
+       case VC_COMMAND_TYPE_NONE:              return 0;
+       case VC_COMMAND_TYPE_BACKGROUND:        return 1;
+       case VC_COMMAND_TYPE_FOREGROUND:        return 2;
+       case VC_COMMAND_TYPE_WIDGET:            return 2;
+       case VC_COMMAND_TYPE_SYSTEM:            return 3;
+       case VC_COMMAND_TYPE_EXCLUSIVE:         return 3;
+       default:                                return 0;
        }
 }