From: Rahul Dadhich Date: Wed, 7 Dec 2016 12:55:16 +0000 (+0530) Subject: Fixed SVACE Errors X-Git-Tag: submit/tizen_3.0/20161209.061956~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b19f3547091800af21c5f994996d428a360c363a;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Fixed SVACE Errors Change-Id: I7742b803bb09e8ada4a01462bb9fcd9b39e2221b Signed-off-by: Rahul Dadhich --- diff --git a/src/common/mp-file-util.c b/src/common/mp-file-util.c index be47d02..8f1ea7b 100644 --- a/src/common/mp-file-util.c +++ b/src/common/mp-file-util.c @@ -329,7 +329,7 @@ int mp_file_cp(const char *src, const char *dst) return 0; } - if (realpath(dst, realpath2) && realpath1 && realpath2 && !strcmp(realpath1, realpath2)) { + if (realpath(dst, realpath2) && realpath2 && !strcmp(realpath1, realpath2)) { DEBUG_TRACE("realpath check failed"); return 0; } diff --git a/src/common/mp-util.c b/src/common/mp-util.c index f1057fa..f90b414 100644 --- a/src/common/mp-util.c +++ b/src/common/mp-util.c @@ -539,9 +539,13 @@ mp_util_file_is_in_phone_memory(const char *path) MP_CHECK_VAL(path, 0); int phone_len = 0; char *phone_path = MP_PHONE_ROOT_PATH; - if (phone_path) { - phone_len = strlen(phone_path); + + if (!phone_path) { + return 1; } + + phone_len = strlen(phone_path); + if (!strncmp(phone_path, path, phone_len)) { IF_FREE(phone_path); return 1; @@ -2405,14 +2409,20 @@ mp_dir_e mp_util_get_file_location(const char *uri) ERROR_TRACE("Internal Storage Path cannot be determined"); } else { internalPath = g_strdup(mp_get_media_directory(STORAGE_TYPE_INTERNAL)); + if (!internalPath) { + return MP_DIR_NONE; + } len_phone = strlen(internalPath); - DEBUG_TRACE("External Storage Path is: %s", externalPath); + DEBUG_TRACE("Internal Storage Path is: %s", externalPath); } if (!mp_get_media_directory(STORAGE_TYPE_EXTERNAL)) { ERROR_TRACE("External Storage Path cannot be determined"); } else { externalPath = g_strdup(mp_get_media_directory(STORAGE_TYPE_EXTERNAL)); + if (!externalPath) { + return MP_DIR_NONE; + } len_memory = strlen(externalPath); DEBUG_TRACE("External Storage Path is: %s", externalPath); } diff --git a/src/view/mp-setting-view.c b/src/view/mp-setting-view.c index 84fb698..d88b7eb 100644 --- a/src/view/mp-setting-view.c +++ b/src/view/mp-setting-view.c @@ -316,11 +316,6 @@ _ms_append_genlist_items(Evas_Object *genlist, MpSettingView_t *view) (void *)i, NULL, flag, _gl_sel, (void *)i); } - - /* evas_object_smart_callback_add(genlist, "expanded", - _gl_exp, genlist); - evas_object_smart_callback_add(genlist, "contracted", - _gl_con, genlist); */ } static void