forked from enlightenment/efl
examples ecore_buffer: correct argument order for calloc()
calloc() expects count first and the actual size to allocate as second argument. Say Thank You to smatch for finding this issues for us.
This commit is contained in:
parent
886c20a43b
commit
384261978c
|
@ -144,7 +144,7 @@ main(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
cd = (Consumer_Data *)calloc(sizeof(Consumer_Data), 1);
|
||||
cd = (Consumer_Data *)calloc(1, sizeof(Consumer_Data));
|
||||
|
||||
if (!cd || !(cd->consumer = ecore_buffer_consumer_new(name, queue_size, WIDTH, HEIGHT)))
|
||||
{
|
||||
|
|
|
@ -244,7 +244,7 @@ main(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
pd = (Provider_Data *)calloc(sizeof(Provider_Data), 1);
|
||||
pd = (Provider_Data *)calloc(1, sizeof(Provider_Data));
|
||||
|
||||
if (!pd || !(pd->provider = ecore_buffer_provider_new(name)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue