[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new() family of functio
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new() family of functions |
Date: |
Fri, 6 Oct 2017 20:49:39 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/core/loader.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 4593061445..def4766dbb 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -899,7 +899,7 @@ int rom_add_file(const char *file, const char *fw_dir,
return -1;
}
- rom = g_malloc0(sizeof(*rom));
+ rom = g_new0(Rom, 1);
rom->name = g_strdup(file);
rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name);
rom->as = as;
@@ -996,7 +996,7 @@ MemoryRegion *rom_add_blob(const char *name, const void
*blob, size_t len,
Rom *rom;
MemoryRegion *mr = NULL;
- rom = g_malloc0(sizeof(*rom));
+ rom = g_new0(Rom, 1);
rom->name = g_strdup(name);
rom->as = as;
rom->addr = addr;
@@ -1039,7 +1039,7 @@ int rom_add_elf_program(const char *name, void *data,
size_t datasize,
{
Rom *rom;
- rom = g_malloc0(sizeof(*rom));
+ rom = g_new0(Rom, 1);
rom->name = g_strdup(name);
rom->addr = addr;
rom->datasize = datasize;
--
2.14.2
- [Qemu-devel] [PATCH 35/88] Record/replay: use g_new() family of functions, (continued)
- [Qemu-devel] [PATCH 35/88] Record/replay: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 36/88] SLIRP: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 37/88] TCG: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 38/88] VFIO: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 39/88] hw/i386: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 40/88] hw/xen: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 42/88] XTFPGA: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 41/88] target/i386: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 43/88] hw/core: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new() family of functions,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 45/88] hw/display: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 46/88] hw/display/vga: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 47/88] hw/i2c: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 48/88] hw/input: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 49/88] hw/misc: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 50/88] ivshmem: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06