Change return type of dcm_svc_db_disconnect() 84/211284/2 accepted/tizen/unified/20190806.072210 submit/tizen/20190805.053702
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 1 Aug 2019 06:21:21 +0000 (15:21 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 1 Aug 2019 07:19:03 +0000 (16:19 +0900)
sqlite3_close_v2() always returns SQLITE_OK.
Therefore, it does not need to check the return value.

Change-Id: Iaa787cb8a8fd247dd0011a2593bad5258c5d1efb
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/dcm_svc_db.h
src/dcm_svc_db.c

index 08e17d13b0e118732a5681d4aa46187d5101a477..1ff83bdd0ee8302011496faa7baac6e2556e5a89 100755 (executable)
@@ -31,7 +31,7 @@ typedef enum {
 } dcm_face_scan_status_e;
 
 int dcm_svc_db_connect(uid_t uid);
-int dcm_svc_db_disconnect();
+void dcm_svc_db_disconnect();
 int dcm_svc_db_get_scan_image_info_by_path(const char *file_path, dcm_svc_item_s **scan_item);
 int dcm_svc_db_insert_face_to_db(const char *media_uuid, unsigned int x, unsigned int y, unsigned int w, unsigned int h, int orientation);
 int dcm_svc_db_insert_face_to_face_scan_list(dcm_svc_item_s *scan_item);
index 9e46afc1312395517a1d97b16b520a8fd65cf88c..ecf8544c630398a5ecec4b96e1b5bc809902aecb 100755 (executable)
@@ -90,26 +90,14 @@ int dcm_svc_db_connect(uid_t uid)
        return MS_MEDIA_ERR_NONE;
 }
 
-int dcm_svc_db_disconnect(void)
+void dcm_svc_db_disconnect(void)
 {
-       int ret = MS_MEDIA_ERR_NONE;
-
        dcm_warn("media db handle: %p", db_handle);
 
-       if (db_handle != NULL) {
-               ret = media_db_disconnect(db_handle);
-               if (ret != MS_MEDIA_ERR_NONE) {
-                       dcm_error("media_db_disconnect failed: %d", ret);
-                       db_handle = NULL;
-                       return ret;
-               }
-       }
+       if (db_handle)
+               media_db_disconnect(db_handle);
 
        db_handle = NULL;
-
-       dcm_debug_fleave();
-
-       return MS_MEDIA_ERR_NONE;
 }
 
 int dcm_svc_db_get_scan_image_info_by_path(const char *file_path, dcm_svc_item_s **scan_item)