mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
cpukit/libblock/src/bdbuf.c: Fix order of calloc() arguments
Address calls to calloc () which swap the number of elements and size of each element argument.
This commit is contained in:
committed by
Gedare Bloom
parent
c0fba626cb
commit
65cac69a1c
@@ -1353,16 +1353,16 @@ rtems_bdbuf_do_init (void)
|
||||
/*
|
||||
* Allocate the memory for the buffer descriptors.
|
||||
*/
|
||||
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
|
||||
bdbuf_cache.buffer_min_count);
|
||||
bdbuf_cache.bds = calloc (bdbuf_cache.buffer_min_count,
|
||||
sizeof (rtems_bdbuf_buffer));
|
||||
if (!bdbuf_cache.bds)
|
||||
goto error;
|
||||
|
||||
/*
|
||||
* Allocate the memory for the buffer descriptors.
|
||||
*/
|
||||
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
|
||||
bdbuf_cache.group_count);
|
||||
bdbuf_cache.groups = calloc (bdbuf_cache.group_count,
|
||||
sizeof (rtems_bdbuf_group));
|
||||
if (!bdbuf_cache.groups)
|
||||
goto error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user