]> Git Repo - qemu.git/blobdiff - hw/misc/omap_clk.c
arm: Use g_new() & friends where that makes obvious sense
[qemu.git] / hw / misc / omap_clk.c
index 80a3c50e1e1277c25c807d72b3a173312a58997f..73d4f8becd66dc16598bc58aaa0680dc75688459 100644 (file)
@@ -1239,7 +1239,7 @@ void omap_clk_init(struct omap_mpu_state_s *mpu)
     for (i = onchip_clks, count = 0; *i; i ++)
         if ((*i)->flags & flag)
             count ++;
-    mpu->clks = (struct clk *) g_malloc0(sizeof(struct clk) * (count + 1));
+    mpu->clks = g_new0(struct clk, count + 1);
     for (i = onchip_clks, j = mpu->clks; *i; i ++)
         if ((*i)->flags & flag) {
             memcpy(j, *i, sizeof(struct clk));
This page took 0.023145 seconds and 4 git commands to generate.