get rid of 0 byte alloc

SVN revision: 34440
This commit is contained in:
Carsten Haitzler 2008-05-03 05:33:26 +00:00
parent 6132d451c9
commit 14e2187305
2 changed files with 9 additions and 3 deletions

View File

@ -170,7 +170,8 @@ _edje_var_init(Edje *ed)
embryo_program_vm_push(ed->collection->script);
ed->var_pool->size = embryo_program_variable_count_get(ed->collection->script);
embryo_program_vm_pop(ed->collection->script);
ed->var_pool->vars = calloc(1, sizeof(Edje_Var) * ed->var_pool->size);
if (ed->var_pool->size > 0)
ed->var_pool->vars = calloc(1, sizeof(Edje_Var) * ed->var_pool->size);
}
void

View File

@ -38,8 +38,13 @@ static void
evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op)
{
memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context));
op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active);
memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active);
if (op->context.cutout.active > 0)
{
op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active);
memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active);
}
else
op->context.cutout.rects = NULL;
}
static void