[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new(
From: |
Alistair Francis |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new() family of functions |
Date: |
Mon, 9 Oct 2017 17:03:01 -0700 |
On Fri, Oct 6, 2017 at 4:49 PM, Philippe Mathieu-Daudé <address@hidden> wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Thanks,
Alistair
> ---
> 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
>
>
- Re: [Qemu-trivial] [PATCH 36/88] SLIRP: use g_new() family of functions, (continued)
- [Qemu-trivial] [PATCH 37/88] TCG: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 38/88] VFIO: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 39/88] hw/i386: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 40/88] hw/xen: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 42/88] XTFPGA: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 41/88] target/i386: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 43/88] hw/core: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 44/88] hw/core/loader: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- Re: [Qemu-trivial] [Qemu-devel] [PATCH 44/88] hw/core/loader: use g_new() family of functions,
Alistair Francis <=
- [Qemu-trivial] [PATCH 45/88] hw/display: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 46/88] hw/display/vga: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 47/88] hw/i2c: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 48/88] hw/input: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 49/88] hw/misc: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 50/88] ivshmem: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 51/88] hw/timer: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06