Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// Assign new declaration to array
parser->declarations = reallocarray(parser->declarations,
- sizeof(*parser->declarations), parser->num_declarations + 1);
+ parser->num_declarations + 1, sizeof(*parser->declarations));
parser->declarations[parser->num_declarations++] = d;
return 0;
return -ERANGE;
// Make space
- path->segments = reallocarray(path->segments, sizeof(*path->segments),
- path->num_segments + 2);
+ path->segments = reallocarray(path->segments, path->num_segments + 2, sizeof(*path->segments));
// Fail if we could not make space
if (!path->segments)