return -1;
}
+/* LCOV_EXCL_START */
static int __check_valid_sender_v2(const char *sender_pkgid)
{
char pkgid[256] = {0, };
return -1;
}
+/* LCOV_EXCL_STOP */
static int __status_handler(const char *endpoint, aul_app_com_result_e e, bundle *envelope, void *user_data)
{
b = bundle_create();
if (!b) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
bundle_add_byte(b, WIDGET_K_PERIOD, &period, sizeof(double));
kb = bundle_create();
if (!kb) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
bundle_add_str(kb, WIDGET_K_OPERATION, "update");
cb_info = (struct event_cb_s *)malloc(sizeof(struct event_cb_s));
if (!cb_info) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
cb_info->cb = cb;
event_cbs = g_list_append(event_cbs, cb_info);
if (!event_cbs) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
return 0;
cb_info = (struct lifecycle_local_s *)malloc(sizeof(struct lifecycle_local_s));
if (!cb_info) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
cb_info->widget_id = strdup(widget_id);
sdk_util.name = strdup(util);
if (sdk_util.name == NULL) {
- _E("out of memory");
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
if (strcmp(util, SDK_DEBUG) == 0) {
sdk_util.argc = len;
sdk_util.args = calloc(len + 1, sizeof(char *));
if (sdk_util.args == NULL) {
- _E("out of memory");
- __free_sdk_util();
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ __free_sdk_util(); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
for (i = 0; i < len; i++) {
sdk_util.args[i] = strdup(util_arg_array[i]);
if (sdk_util.args[i] == NULL) {
- _E("out of memory");
- __free_sdk_util();
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ __free_sdk_util(); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
}
}
if (caller_pid) {
sdk_util.caller = strdup(caller_pid);
if (sdk_util.caller == NULL) {
- _E("out of memory");
- __free_sdk_util();
- return -1;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ __free_sdk_util(); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
}
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_START */
static int _instance_cb(const char *widget_id, const char *instance_id, void *data)
{
int ret;
}
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
EAPI int widget_service_change_period(const char *pkgname, const char *id, double period)
{
buf_len = strlen(path) + strlen(_iso3lang) + strlen(_country) + 3; /* '/' '-' '/' */
lang_path = malloc(buf_len + 1);
if (!lang_path) {
+ /* LCOV_EXCL_START */
set_last_result(WIDGET_ERROR_OUT_OF_MEMORY);
_E("Heap: %d", errno);
free(path);
return NULL;
+ /* LCOV_EXCL_STOP */
}
for (i = strlen(path); i >= 0 && path[i] != '/'; i--);
language = strdup(lang);
if (!language) {
+ /* LCOV_EXCL_START */
_E("Out-of-memory");
set_last_result(WIDGET_ERROR_OUT_OF_MEMORY);
return NULL;
+ /* LCOV_EXCL_STOP */
}
name = _get_name(widget_id, language, getuid());
new_pkgid = strdup(pkgid);
pkgmgrinfo_appinfo_destroy_appinfo(appinfo);
if (new_pkgid == NULL) {
- _E("out of memory");
- return NULL;
+ _E("out of memory"); /* LCOV_EXCL_LINE */
+ return NULL; /* LCOV_EXCL_LINE */
}
id = new_pkgid;
}
int cnt;
};
+/* LCOV_EXCL_START */
static void __instance_list_cb(const char *instance_id, void *user_data)
{
struct instance_cb *cb_data = (struct instance_cb *)user_data;
if (cb_data->cb)
cb_data->cb(cb_data->widget_id, instance_id, cb_data->data);
}
+/* LCOV_EXCL_STOP */
EAPI int widget_service_get_widget_instance_list(const char *widget_id, widget_instance_list_cb cb, void *data)
{