daemon: Use correct argument order for calloc() to fix compiler warning
The number of elements is the first argument, their size the second. The previous code triggered the following warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
This commit is contained in:
@@ -652,7 +652,7 @@ METHOD(daemon_t, set_default_loggers, void,
|
|||||||
{
|
{
|
||||||
if (!this->levels)
|
if (!this->levels)
|
||||||
{
|
{
|
||||||
this->levels = calloc(sizeof(level_t), DBG_MAX);
|
this->levels = calloc(DBG_MAX, sizeof(level_t));
|
||||||
}
|
}
|
||||||
for (group = 0; group < DBG_MAX; group++)
|
for (group = 0; group < DBG_MAX; group++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user