From: Minje Ahn Date: Wed, 12 Aug 2020 23:22:53 +0000 (+0900) Subject: Remove 'err' in msc_directory_scan_thread() X-Git-Tag: accepted/tizen/unified/20200820.034638~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F240912%2F1;p=platform%2Fcore%2Fmultimedia%2Fmedia-server.git Remove 'err' in msc_directory_scan_thread() Change-Id: Iedc9d6718b492a34a91bfa1a494029e0007ff1df Signed-off-by: Minje Ahn --- diff --git a/src/scanner-v2/media-scanner-scan-v2.c b/src/scanner-v2/media-scanner-scan-v2.c index c524dc8..a8bb2c5 100644 --- a/src/scanner-v2/media-scanner-scan-v2.c +++ b/src/scanner-v2/media-scanner-scan-v2.c @@ -785,7 +785,6 @@ static void __msc_del_cur_scan_item(void) gpointer msc_directory_scan_thread(gpointer data) { ms_comm_msg_s *scan_data = NULL; - int err; int ret = MS_MEDIA_ERR_NONE; sqlite3 *handle = NULL; bool modified = false; @@ -863,9 +862,8 @@ gpointer msc_directory_scan_thread(gpointer data) MS_DBG_WARN("start recursive dir scan!!"); g_directory_scan_processing2 = DIR_SCAN_RECURSIVE; - err = __msc_check_scan_same_path(scan_data->msg); - if (MS_MEDIA_ERR_NONE == err) { + if (__msc_check_scan_same_path(scan_data->msg) == 0) { MS_DBG_WARN("[%.*s] is scanning recursive, waiting...", MAX_MSG_SIZE, scan_data->msg); msc_send_result_partial(ret, MS_MSG_RECURSIVE_START, scan_data->pid, scan_data->msg); while (1) { @@ -875,9 +873,7 @@ gpointer msc_directory_scan_thread(gpointer data) if (ret != MS_MEDIA_ERR_NONE) goto NEXT; - - err = __msc_check_scan_same_path(scan_data->msg); - if (err != MS_MEDIA_ERR_NONE) + if (__msc_check_scan_same_path(scan_data->msg) != 0) break; } @@ -931,19 +927,19 @@ gpointer msc_directory_scan_thread(gpointer data) goto SCAN_DONE; } else { MS_DBG_WARN("set folder item invalid"); - err = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); + ret = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); } } else { - err = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); + ret = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); } } else { MS_DBG_WARN("check [%.*s] has been modified !!", MAX_MSG_SIZE, scan_data->msg); - err = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); + ret = ms_set_folder_item_validity(handle, scan_data->storage_id, scan_data->msg, MS_INVALID, MS_NON_RECURSIVE, scan_data->uid); } } - if (err != MS_MEDIA_ERR_NONE) - MS_DBG_ERR("error : %d", err); + if (ret != MS_MEDIA_ERR_NONE) + MS_DBG_ERR("error : %d", ret); /*call for bundle commit*/ ms_batch_commit_enable(false, 0);