common: apply Tizen coding rule 38/77138/1 accepted/tizen/common/20160629.222836 accepted/tizen/ivi/20160629.070510 accepted/tizen/mobile/20160629.070505 accepted/tizen/tv/20160629.070459 accepted/tizen/wearable/20160629.070451 submit/tizen/20160629.012232
authortaeyoung <ty317.kim@samsung.com>
Tue, 28 Jun 2016 23:33:09 +0000 (08:33 +0900)
committertaeyoung <ty317.kim@samsung.com>
Tue, 28 Jun 2016 23:33:47 +0000 (08:33 +0900)
Signed-off-by: taeyoung <ty317.kim@samsung.com>
Change-Id: I7b6a4e580dc1e2e615cd3c39ec4762150156b09e

src/storage.c

index 452c230..26b4036 100644 (file)
@@ -266,17 +266,16 @@ API int storage_get_state(int storage_id, storage_state_e *state)
 }
 
 static void compat_cb(int storage_id,
-                storage_dev_e dev, storage_state_e state,
-                const char *fstype, const char *fsuuid, const char *mountpath,
-                bool primary, int flags, void *user_data)
+               storage_dev_e dev, storage_state_e state,
+               const char *fstype, const char *fsuuid, const char *mountpath,
+               bool primary, int flags, void *user_data)
 {
        struct compat_cb_info* ccb_info;
        dd_list *elem;
 
-       if(storage_id == STORAGE_TYPE_EXTERNAL && dev == STORAGE_DEV_EXT_SDCARD){
+       if (storage_id == STORAGE_TYPE_EXTERNAL && dev == STORAGE_DEV_EXT_SDCARD)
                DD_LIST_FOREACH(compat_cb_list, elem, ccb_info)
                        ccb_info->user_cb(storage_id, state, ccb_info->user_data);
-       }
 }
 
 API int storage_set_state_changed_cb(int storage_id, storage_state_changed_cb callback, void *user_data)
@@ -299,16 +298,16 @@ API int storage_set_state_changed_cb(int storage_id, storage_state_changed_cb ca
 
        /* For backward compatability */
        if (storage_id == STORAGE_TYPE_EXTERNAL) {
-               if(!compat_cb_init){
+               if (!compat_cb_init) {
                        ret = storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, compat_cb, NULL);
-                       if(ret == STORAGE_ERROR_NONE)
+                       if (ret == STORAGE_ERROR_NONE)
                                compat_cb_init = 1;
                        else
                                return ret;
                }
 
                ccb_info = malloc(sizeof(struct compat_cb_info));
-               if(ccb_info == NULL)
+               if (ccb_info == NULL)
                        return STORAGE_ERROR_OPERATION_FAILED;
                ccb_info->user_cb = callback;
                ccb_info->user_data = user_data;
@@ -357,7 +356,7 @@ API int storage_unset_state_changed_cb(int storage_id, storage_state_changed_cb
                struct compat_cb_info* ccb_info;
 
                DD_LIST_FOREACH_SAFE(compat_cb_list, elem, elem_n, ccb_info) {
-                       if(ccb_info->user_cb == callback){
+                       if (ccb_info->user_cb == callback) {
                                DD_LIST_REMOVE(compat_cb_list, ccb_info);
                                free(ccb_info);
                                return STORAGE_ERROR_NONE;