[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 77/88] dump: use g_new() family of functions
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 77/88] dump: use g_new() family of functions |
Date: |
Fri, 6 Oct 2017 20:50:12 -0300 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
---
dump.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dump.c b/dump.c
index 7ebcf553b2..884221a904 100644
--- a/dump.c
+++ b/dump.c
@@ -1825,29 +1825,28 @@ void qmp_dump_guest_memory(bool paging, const char
*file,
DumpGuestMemoryCapability *qmp_query_dump_guest_memory_capability(Error **errp)
{
DumpGuestMemoryFormatList *item;
- DumpGuestMemoryCapability *cap =
- g_malloc0(sizeof(DumpGuestMemoryCapability));
+ DumpGuestMemoryCapability *cap = g_new0(DumpGuestMemoryCapability, 1);
/* elf is always available */
- item = g_malloc0(sizeof(DumpGuestMemoryFormatList));
+ item = g_new0(DumpGuestMemoryFormatList, 1);
cap->formats = item;
item->value = DUMP_GUEST_MEMORY_FORMAT_ELF;
/* kdump-zlib is always available */
- item->next = g_malloc0(sizeof(DumpGuestMemoryFormatList));
+ item->next = g_new0(DumpGuestMemoryFormatList, 1);
item = item->next;
item->value = DUMP_GUEST_MEMORY_FORMAT_KDUMP_ZLIB;
/* add new item if kdump-lzo is available */
#ifdef CONFIG_LZO
- item->next = g_malloc0(sizeof(DumpGuestMemoryFormatList));
+ item->next = g_new0(DumpGuestMemoryFormatList, 1);
item = item->next;
item->value = DUMP_GUEST_MEMORY_FORMAT_KDUMP_LZO;
#endif
/* add new item if kdump-snappy is available */
#ifdef CONFIG_SNAPPY
- item->next = g_malloc0(sizeof(DumpGuestMemoryFormatList));
+ item->next = g_new0(DumpGuestMemoryFormatList, 1);
item = item->next;
item->value = DUMP_GUEST_MEMORY_FORMAT_KDUMP_SNAPPY;
#endif
--
2.14.2
- [Qemu-devel] [PATCH 69/88] virtio-9p: use g_new() family of functions, (continued)
- [Qemu-devel] [PATCH 69/88] virtio-9p: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 70/88] block: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 72/88] hw/block/nvme: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 71/88] block: avoid use of g_new0(), Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 73/88] hw/block/xen_disk: avoid use of g_new0(), Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 74/88] balloon: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 75/88] decnumber: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 76/88] dma: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 77/88] dump: use g_new() family of functions,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 78/88] gdb: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 79/88] hmp: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 80/88] numa: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 81/88] hw/acpi: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 82/88] hw/ipmi: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 83/88] hw/pci: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-devel] [PATCH 84/88] hw/scsi: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06