_efl_access_object_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Efl_Event_Cb cb, void *data)
{
Efl_Access_Event_Handler *ret = calloc(1, sizeof(Efl_Access_Event_Handler));
+ if (!ret) return NULL;
ret->cb = cb;
ret->data = data;
for (i = 0; i < pd->page_info_num; i++)
{
pi = calloc(1, sizeof(*pi));
+ if (!pi) return;
if (i == 0) pd->head = pi;
else if (i == (pd->page_info_num - 1)) pd->tail = pi;
pi->id = i;
Page_Info *pi;
pi = calloc(1, sizeof(*pi));
+ if (!pi) return NULL;
pi->obj = efl_add(EFL_UI_BOX_CLASS, spd->pager.obj);
efl_canvas_group_member_add(spd->pager.group, pi->obj);
pi->content_num = -1;
{
Efl_Ui_Progress_Status *ps;
ps = calloc(1, sizeof(Efl_Ui_Progress_Status));
+ if (!ps) return NULL;
ps->part_name = eina_stringshare_add(part_name);
ps->val = val;
return ps;
{
EFL_UI_PROGRESSBAR_DATA_GET_OR_RETURN(obj, sd);
Pb_Format_Wrapper_Data *pfwd = malloc(sizeof(Pb_Format_Wrapper_Data));
+ if (!pfwd) return;
pfwd->format_cb = func;
pfwd->format_free_cb = free_func;
if (!gi)
{
gi = calloc(1, sizeof(*gi));
+ if (!gi) return EINA_FALSE;
gi->col = col;
gi->row = row;
gi->col_span = colspan;
if (!shadow)
{
shadow = calloc(1, sizeof(*shadow));
+ if (!shadow) return NULL;
shadow->widget = pd->obj;
efl_key_data_set(widget, "__elm_shadow", shadow);
efl_event_callback_array_add(widget, widget_shadow_cb(), shadow);
Elm_Code *ret;
ret = calloc(1, sizeof(Elm_Code));
+ if (!ret) return NULL;
ret->config.indent_style_efl = EINA_TRUE;
// create an in-memory backing for this elm_code by default
dirlen = strlen(path) - strlen(name);
tmp = malloc(sizeof(char) * (strlen(path) + 6));
+ if (!tmp) return NULL;
snprintf(tmp, dirlen + 1, "%s", path);
snprintf(tmp + dirlen, strlen(name) + 6, ".%s.tmp", name);
elm_code_file_free(code->file);
ret = calloc(1, sizeof(Elm_Code_File));
+ if (!ret) return NULL;
code->file = ret;
ret->parent = code;
text2 = elm_code_line_text_get(line2, &length2);
newtext = malloc(sizeof(char) * (length1 + length2 + 1));
+ if (!newtext) return;
if (length1 > 0)
snprintf(newtext, length1 + 1, "%s", text1);
if (length2 > 0)
return;
tok = calloc(1, sizeof(Elm_Code_Token));
+ if (!tok) return;
tok->start = start;
tok->end = end;
if (line->number > 0)
{
number = malloc(sizeof(char) * gutter);
+ if (!number) return;
snprintf(number, gutter, "%*d", gutter - 1, line->number);
}
for (g = 0; g < gutter - 1; g++)
Elm_Code_Widget_Change_Info *info;
info = calloc(1, sizeof(*info));
+ if (!info) return NULL;
info->insert = insert;
info->start_col = start_col;
textlen = strlen(leading) + 2;
text = malloc(sizeof(char) * textlen);
+ if (!text) return;
snprintf(text, textlen, "\n%s", leading);
free(leading);
}
ret = malloc(sizeof(char) * (ret_len + 1));
+ if (!ret) goto end;
snprintf(ret, strlen(first) + newline_len + 1, "%s%s", first, newline);
}
snprintf(ptr, strlen(last) + 1, "%s", last);
+end:
free(first);
free(last);
return ret;
Elm_Code_Widget_Change_Info *copy;
copy = calloc(1, sizeof(*info));
+ if (!copy) return NULL;
memcpy(copy, info, sizeof(*info));
copy->content = strndup(info->content, info->length);
EINA_INLIST_FOREACH(*src, etf)
{
cpy = malloc(sizeof(Elm_Theme_File));
+ EINA_SAFETY_ON_NULL_RETURN(cpy);
cpy->item = eina_stringshare_ref(etf->item);
cpy->handle = eina_file_dup(etf->handle);
*dst = eina_inlist_append(*dst, EINA_INLIST_GET(cpy));