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:
Stefan Schmidt 2015-11-30 16:22:02 +01:00
parent 886c20a43b
commit 384261978c
2 changed files with 2 additions and 2 deletions

View File

@ -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)))
{

View File

@ -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)))
{