remove uncovered code 35/298935/1 accepted/tizen/8.0/unified/20231005.093537 accepted/tizen/unified/20230919.091742
authorRandeep Singh <randeep.s@samsung.com>
Fri, 15 Sep 2023 10:38:39 +0000 (16:08 +0530)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 15 Sep 2023 10:38:39 +0000 (16:08 +0530)
Change-Id: I37919654615a4c0ded5f08c02dbac835c497c9b1
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
common/ctsvc_record_result.c
common/ctsvc_socket.c

index 301ba47..51caeaf 100644 (file)
@@ -78,7 +78,9 @@ static int __ctsvc_result_destroy(contacts_record_h record, bool delete_child)
        for (cursor = result->values; cursor; cursor = cursor->next) {
                ctsvc_result_value_s *data = cursor->data;
                if (data->type == CTSVC_VIEW_DATA_TYPE_STR)
+                       /* LCOV_EXCL_START */
                        free(data->value.s);
+                       /* LCOV_EXCL_STOP */
                free(data);
        }
        g_slist_free(result->values);
@@ -216,14 +218,17 @@ static int __ctsvc_result_set_int(contacts_record_h record, unsigned int propert
        ctsvc_result_value_s *data;
 
        if (CTSVC_VIEW_DATA_TYPE_INT != (CTSVC_VIEW_DATA_TYPE_INT & property_id)) {
+               /* LCOV_EXCL_START */
                ERR("property_id is not int type.");
                return CONTACTS_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
        }
 
        for (cursor = result->values; cursor; cursor = cursor->next) {
                data = cursor->data;
                if (data->property_id == property_id) {
 #ifdef _CONTACTS_IPC_SERVER
+                       /* LCOV_EXCL_START */
                        if (CTSVC_PROPERTY_PHONELOG_SIM_SLOT_NO == property_id
                                        || CTSVC_PROPERTY_PHONELOG_STAT_SIM_SLOT_NO == property_id) {
                                CHECK_DIRTY_VAL(data->value.i, value, is_dirty);
@@ -235,6 +240,7 @@ static int __ctsvc_result_set_int(contacts_record_h record, unsigned int propert
                                data->value.i = value;
                        }
                        return CONTACTS_ERROR_NONE;
+                       /* LCOV_EXCL_STOP */
                }
        }
 
@@ -278,20 +284,16 @@ static int __ctsvc_result_set_bool(contacts_record_h record, unsigned int proper
                                data->value.b = value;
                                return CONTACTS_ERROR_NONE;
                        } else {
-                               /* LCOV_EXCL_START */
                                ERR("use another get_type API, (type : %d)", data->type);
                                return CONTACTS_ERROR_INVALID_PARAMETER;
-                               /* LCOV_EXCL_STOP */
                        }
                }
        }
 
        data = calloc(1, sizeof(ctsvc_result_value_s));
        if (NULL == data) {
-               /* LCOV_EXCL_START */
                ERR("calloc() Fail");
                return CONTACTS_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
        }
        data->property_id = property_id;
        data->type = CTSVC_VIEW_DATA_TYPE_BOOL;
@@ -324,10 +326,8 @@ static int __ctsvc_result_set_str(contacts_record_h record, unsigned int propert
                                        str_len = strlen(CTSVC_CONTACT_IMG_FULL_LOCATION) + strlen(str) + 2;
                                        full_path = calloc(1, str_len);
                                        if (NULL == full_path) {
-                                               /* LCOV_EXCL_START */
                                                ERR("calloc() Fail");
                                                return CONTACTS_ERROR_OUT_OF_MEMORY;
-                                               /* LCOV_EXCL_STOP */
                                        }
                                        snprintf(full_path, str_len, "%s/%s", CTSVC_CONTACT_IMG_FULL_LOCATION, str);
                                }
@@ -345,10 +345,8 @@ static int __ctsvc_result_set_str(contacts_record_h record, unsigned int propert
 
        data = calloc(1, sizeof(ctsvc_result_value_s));
        if (NULL == data) {
-               /* LCOV_EXCL_START */
                ERR("calloc() Fail");
                return CONTACTS_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
        }
        data->property_id = property_id;
        data->type = CTSVC_VIEW_DATA_TYPE_STR;
@@ -359,11 +357,9 @@ static int __ctsvc_result_set_str(contacts_record_h record, unsigned int propert
                        str_len = strlen(CTSVC_CONTACT_IMG_FULL_LOCATION) + strlen(str) + 2;
                        full_path = calloc(1, str_len);
                        if (NULL == full_path) {
-                               /* LCOV_EXCL_START */
                                ERR("calloc() Fail");
                                free(data);
                                return CONTACTS_ERROR_OUT_OF_MEMORY;
-                               /* LCOV_EXCL_STOP */
                        }
                        snprintf(full_path, str_len, "%s/%s", CTSVC_CONTACT_IMG_FULL_LOCATION, str);
                }
@@ -392,10 +388,8 @@ static int __ctsvc_result_get_bool(contacts_record_h record, unsigned int proper
                                *out_value = data->value.b;
                                return CONTACTS_ERROR_NONE;
                        } else {
-                               /* LCOV_EXCL_START */
                                ERR("use another get_type API, (type : %d)", data->type);
                                return CONTACTS_ERROR_INVALID_PARAMETER;
-                               /* LCOV_EXCL_STOP */
                        }
                }
        }
index f072faf..ec8101f 100644 (file)
@@ -239,7 +239,7 @@ static void __ctsvc_remove_invalid_msg(int fd, int size)
                }
        }
 }
-
+/* LCOV_EXCL_START */
 int ctsvc_request_sim_import(int sim_slot_no, contacts_sim_import_progress_cb callback,
                void *user_data)
 {