[opcodes] ARC + PPC: Fix -Walloc-size warnings

Recently, -Walloc-size warnings started to kick in. Fix these two
calloc() calls to match the intended usage pattern.

opcodes/ChangeLog:

	* arc-dis.c (init_arc_disasm_info): Fix calloc() call.
	* ppc-dis.c (powerpc_init_dialect): Ditto.
This commit is contained in:
Jan-Benedict Glaw
2023-11-21 17:53:44 +01:00
parent 790ce1f70c
commit 54195469c1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ static bool
init_arc_disasm_info (struct disassemble_info *info)
{
struct arc_disassemble_info *arc_infop
= calloc (sizeof (*arc_infop), 1);
= calloc (1, sizeof (*arc_infop));
if (arc_infop == NULL)
return false;
+1 -1
View File
@@ -348,7 +348,7 @@ powerpc_init_dialect (struct disassemble_info *info)
{
ppc_cpu_t dialect = 0;
ppc_cpu_t sticky = 0;
struct dis_private *priv = calloc (sizeof (*priv), 1);
struct dis_private *priv = calloc (1, sizeof (*priv));
if (priv == NULL)
return;