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:
Tobias Brunner 2024-07-12 14:00:15 +02:00
parent 574bfad1c0
commit 6eec5cc07d

View File

@ -652,7 +652,7 @@ METHOD(daemon_t, set_default_loggers, void,
{
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++)
{