* [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense
@ 2015-09-14 11:51 Markus Armbruster
2015-09-14 15:51 ` Eric Blake
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Markus Armbruster @ 2015-09-14 11:51 UTC (permalink / raw)
To: qemu-devel; +Cc: amit.shah, quintela
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
for two reasons. One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.
This commit only touches allocations with size arguments of the form
sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
migration/migration.c | 2 +-
migration/qemu-file-buf.c | 2 +-
migration/qemu-file-stdio.c | 4 ++--
migration/qemu-file-unix.c | 4 ++--
migration/qemu-file.c | 2 +-
migration/rdma.c | 17 ++++++++---------
migration/savevm.c | 12 ++++++------
7 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 662e77e..e0ce401 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -86,7 +86,7 @@ MigrationIncomingState *migration_incoming_get_current(void)
MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
{
- mis_current = g_malloc0(sizeof(MigrationIncomingState));
+ mis_current = g_new0(MigrationIncomingState, 1);
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
diff --git a/migration/qemu-file-buf.c b/migration/qemu-file-buf.c
index 2de9330..7adec46 100644
--- a/migration/qemu-file-buf.c
+++ b/migration/qemu-file-buf.c
@@ -439,7 +439,7 @@ QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input)
return NULL;
}
- s = g_malloc0(sizeof(QEMUBuffer));
+ s = g_new0(QEMUBuffer, 1);
s->qsb = input;
if (s->qsb == NULL) {
diff --git a/migration/qemu-file-stdio.c b/migration/qemu-file-stdio.c
index 285068b..079caee 100644
--- a/migration/qemu-file-stdio.c
+++ b/migration/qemu-file-stdio.c
@@ -143,7 +143,7 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileStdio));
+ s = g_new0(QEMUFileStdio, 1);
s->stdio_file = stdio_file;
@@ -175,7 +175,7 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileStdio));
+ s = g_new0(QEMUFileStdio, 1);
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file) {
diff --git a/migration/qemu-file-unix.c b/migration/qemu-file-unix.c
index bfbc086..7d80a54 100644
--- a/migration/qemu-file-unix.c
+++ b/migration/qemu-file-unix.c
@@ -192,7 +192,7 @@ QEMUFile *qemu_fdopen(int fd, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileSocket));
+ s = g_new0(QEMUFileSocket, 1);
s->fd = fd;
if (mode[0] == 'r') {
@@ -226,7 +226,7 @@ QEMUFile *qemu_fopen_socket(int fd, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileSocket));
+ s = g_new0(QEMUFileSocket, 1);
s->fd = fd;
if (mode[0] == 'w') {
qemu_set_block(s->fd);
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 6bb3dc1..6162e7e 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -60,7 +60,7 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops)
{
QEMUFile *f;
- f = g_malloc0(sizeof(QEMUFile));
+ f = g_new0(QEMUFile, 1);
f->opaque = opaque;
f->ops = ops;
diff --git a/migration/rdma.c b/migration/rdma.c
index 9424834..8886fa2 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -541,7 +541,7 @@ static int rdma_add_block(RDMAContext *rdma, const char *block_name,
RDMALocalBlock *block;
RDMALocalBlock *old = local->block;
- local->block = g_malloc0(sizeof(RDMALocalBlock) * (local->nb_blocks + 1));
+ local->block = g_new0(RDMALocalBlock, local->nb_blocks + 1);
if (local->nb_blocks) {
int x;
@@ -572,7 +572,7 @@ static int rdma_add_block(RDMAContext *rdma, const char *block_name,
bitmap_clear(block->transit_bitmap, 0, block->nb_chunks);
block->unregister_bitmap = bitmap_new(block->nb_chunks);
bitmap_clear(block->unregister_bitmap, 0, block->nb_chunks);
- block->remote_keys = g_malloc0(block->nb_chunks * sizeof(uint32_t));
+ block->remote_keys = g_new0(uint32_t, block->nb_chunks);
block->is_ram_block = local->init ? false : true;
@@ -617,8 +617,8 @@ static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
memset(local, 0, sizeof *local);
qemu_ram_foreach_block(qemu_rdma_init_one_block, rdma);
trace_qemu_rdma_init_ram_blocks(local->nb_blocks);
- rdma->dest_blocks = (RDMADestBlock *) g_malloc0(sizeof(RDMADestBlock) *
- rdma->local_ram_blocks.nb_blocks);
+ rdma->dest_blocks = g_new0(RDMADestBlock,
+ rdma->local_ram_blocks.nb_blocks);
local->init = true;
return 0;
}
@@ -677,8 +677,7 @@ static int rdma_delete_block(RDMAContext *rdma, RDMALocalBlock *block)
if (local->nb_blocks > 1) {
- local->block = g_malloc0(sizeof(RDMALocalBlock) *
- (local->nb_blocks - 1));
+ local->block = g_new0(RDMALocalBlock, local->nb_blocks - 1);
if (block->index) {
memcpy(local->block, old, sizeof(RDMALocalBlock) * block->index);
@@ -1164,7 +1163,7 @@ static int qemu_rdma_register_and_get_keys(RDMAContext *rdma,
/* allocate memory to store chunk MRs */
if (!block->pmr) {
- block->pmr = g_malloc0(block->nb_chunks * sizeof(struct ibv_mr *));
+ block->pmr = g_new0(struct ibv_mr *, block->nb_chunks);
}
/*
@@ -2494,7 +2493,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
InetSocketAddress *addr;
if (host_port) {
- rdma = g_malloc0(sizeof(RDMAContext));
+ rdma = g_new0(RDMAContext, 1);
rdma->current_index = -1;
rdma->current_chunk = -1;
@@ -3399,7 +3398,7 @@ static void *qemu_fopen_rdma(RDMAContext *rdma, const char *mode)
return NULL;
}
- r = g_malloc0(sizeof(QEMUFileRDMA));
+ r = g_new0(QEMUFileRDMA, 1);
r->rdma = rdma;
if (mode[0] == 'w') {
diff --git a/migration/savevm.c b/migration/savevm.c
index 33e55fe..7914f86 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -480,7 +480,7 @@ int register_savevm_live(DeviceState *dev,
{
SaveStateEntry *se;
- se = g_malloc0(sizeof(SaveStateEntry));
+ se = g_new0(SaveStateEntry, 1);
se->version_id = version_id;
se->section_id = savevm_state.global_section_id++;
se->ops = ops;
@@ -498,7 +498,7 @@ int register_savevm_live(DeviceState *dev,
pstrcat(se->idstr, sizeof(se->idstr), "/");
g_free(id);
- se->compat = g_malloc0(sizeof(CompatEntry));
+ se->compat = g_new0(CompatEntry, 1);
pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), idstr);
se->compat->instance_id = instance_id == -1 ?
calculate_compat_instance_id(idstr) : instance_id;
@@ -526,7 +526,7 @@ int register_savevm(DeviceState *dev,
LoadStateHandler *load_state,
void *opaque)
{
- SaveVMHandlers *ops = g_malloc0(sizeof(SaveVMHandlers));
+ SaveVMHandlers *ops = g_new0(SaveVMHandlers, 1);
ops->save_state = save_state;
ops->load_state = load_state;
return register_savevm_live(dev, idstr, instance_id, version_id,
@@ -568,7 +568,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
/* If this triggers, alias support can be dropped for the vmsd. */
assert(alias_id == -1 || required_for_version >= vmsd->minimum_version_id);
- se = g_malloc0(sizeof(SaveStateEntry));
+ se = g_new0(SaveStateEntry, 1);
se->version_id = vmsd->version_id;
se->section_id = savevm_state.global_section_id++;
se->opaque = opaque;
@@ -582,7 +582,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
pstrcat(se->idstr, sizeof(se->idstr), "/");
g_free(id);
- se->compat = g_malloc0(sizeof(CompatEntry));
+ se->compat = g_new0(CompatEntry, 1);
pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), vmsd->name);
se->compat->instance_id = instance_id == -1 ?
calculate_compat_instance_id(vmsd->name) : instance_id;
@@ -1544,7 +1544,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
return;
}
- available_snapshots = g_malloc0(sizeof(int) * nb_sns);
+ available_snapshots = g_new0(int, nb_sns);
total = 0;
for (i = 0; i < nb_sns; i++) {
sn = &sn_tab[i];
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense
2015-09-14 11:51 [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense Markus Armbruster
@ 2015-09-14 15:51 ` Eric Blake
2015-09-15 1:10 ` zhanghailiang
2015-09-15 10:25 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2015-09-14 15:51 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel; +Cc: amit.shah, quintela
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
On 09/14/2015 05:51 AM, Markus Armbruster wrote:
> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
> for two reasons. One, it catches multiplication overflowing size_t.
> Two, it returns T * rather than void *, which lets the compiler catch
> more type errors.
>
> This commit only touches allocations with size arguments of the form
> sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> migration/migration.c | 2 +-
> migration/qemu-file-buf.c | 2 +-
> migration/qemu-file-stdio.c | 4 ++--
> migration/qemu-file-unix.c | 4 ++--
> migration/qemu-file.c | 2 +-
> migration/rdma.c | 17 ++++++++---------
> migration/savevm.c | 12 ++++++------
> 7 files changed, 21 insertions(+), 22 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense
2015-09-14 11:51 [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-09-14 15:51 ` Eric Blake
@ 2015-09-15 1:10 ` zhanghailiang
2015-09-15 10:25 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: zhanghailiang @ 2015-09-15 1:10 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel; +Cc: amit.shah, quintela
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
On 2015/9/14 19:51, Markus Armbruster wrote:
> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
> for two reasons. One, it catches multiplication overflowing size_t.
> Two, it returns T * rather than void *, which lets the compiler catch
> more type errors.
>
> This commit only touches allocations with size arguments of the form
> sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> migration/migration.c | 2 +-
> migration/qemu-file-buf.c | 2 +-
> migration/qemu-file-stdio.c | 4 ++--
> migration/qemu-file-unix.c | 4 ++--
> migration/qemu-file.c | 2 +-
> migration/rdma.c | 17 ++++++++---------
> migration/savevm.c | 12 ++++++------
> 7 files changed, 21 insertions(+), 22 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 662e77e..e0ce401 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -86,7 +86,7 @@ MigrationIncomingState *migration_incoming_get_current(void)
>
> MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
> {
> - mis_current = g_malloc0(sizeof(MigrationIncomingState));
> + mis_current = g_new0(MigrationIncomingState, 1);
> mis_current->file = f;
> QLIST_INIT(&mis_current->loadvm_handlers);
>
> diff --git a/migration/qemu-file-buf.c b/migration/qemu-file-buf.c
> index 2de9330..7adec46 100644
> --- a/migration/qemu-file-buf.c
> +++ b/migration/qemu-file-buf.c
> @@ -439,7 +439,7 @@ QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input)
> return NULL;
> }
>
> - s = g_malloc0(sizeof(QEMUBuffer));
> + s = g_new0(QEMUBuffer, 1);
> s->qsb = input;
>
> if (s->qsb == NULL) {
> diff --git a/migration/qemu-file-stdio.c b/migration/qemu-file-stdio.c
> index 285068b..079caee 100644
> --- a/migration/qemu-file-stdio.c
> +++ b/migration/qemu-file-stdio.c
> @@ -143,7 +143,7 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
> return NULL;
> }
>
> - s = g_malloc0(sizeof(QEMUFileStdio));
> + s = g_new0(QEMUFileStdio, 1);
>
> s->stdio_file = stdio_file;
>
> @@ -175,7 +175,7 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode)
> return NULL;
> }
>
> - s = g_malloc0(sizeof(QEMUFileStdio));
> + s = g_new0(QEMUFileStdio, 1);
>
> s->stdio_file = fopen(filename, mode);
> if (!s->stdio_file) {
> diff --git a/migration/qemu-file-unix.c b/migration/qemu-file-unix.c
> index bfbc086..7d80a54 100644
> --- a/migration/qemu-file-unix.c
> +++ b/migration/qemu-file-unix.c
> @@ -192,7 +192,7 @@ QEMUFile *qemu_fdopen(int fd, const char *mode)
> return NULL;
> }
>
> - s = g_malloc0(sizeof(QEMUFileSocket));
> + s = g_new0(QEMUFileSocket, 1);
> s->fd = fd;
>
> if (mode[0] == 'r') {
> @@ -226,7 +226,7 @@ QEMUFile *qemu_fopen_socket(int fd, const char *mode)
> return NULL;
> }
>
> - s = g_malloc0(sizeof(QEMUFileSocket));
> + s = g_new0(QEMUFileSocket, 1);
> s->fd = fd;
> if (mode[0] == 'w') {
> qemu_set_block(s->fd);
> diff --git a/migration/qemu-file.c b/migration/qemu-file.c
> index 6bb3dc1..6162e7e 100644
> --- a/migration/qemu-file.c
> +++ b/migration/qemu-file.c
> @@ -60,7 +60,7 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops)
> {
> QEMUFile *f;
>
> - f = g_malloc0(sizeof(QEMUFile));
> + f = g_new0(QEMUFile, 1);
>
> f->opaque = opaque;
> f->ops = ops;
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 9424834..8886fa2 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -541,7 +541,7 @@ static int rdma_add_block(RDMAContext *rdma, const char *block_name,
> RDMALocalBlock *block;
> RDMALocalBlock *old = local->block;
>
> - local->block = g_malloc0(sizeof(RDMALocalBlock) * (local->nb_blocks + 1));
> + local->block = g_new0(RDMALocalBlock, local->nb_blocks + 1);
>
> if (local->nb_blocks) {
> int x;
> @@ -572,7 +572,7 @@ static int rdma_add_block(RDMAContext *rdma, const char *block_name,
> bitmap_clear(block->transit_bitmap, 0, block->nb_chunks);
> block->unregister_bitmap = bitmap_new(block->nb_chunks);
> bitmap_clear(block->unregister_bitmap, 0, block->nb_chunks);
> - block->remote_keys = g_malloc0(block->nb_chunks * sizeof(uint32_t));
> + block->remote_keys = g_new0(uint32_t, block->nb_chunks);
>
> block->is_ram_block = local->init ? false : true;
>
> @@ -617,8 +617,8 @@ static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
> memset(local, 0, sizeof *local);
> qemu_ram_foreach_block(qemu_rdma_init_one_block, rdma);
> trace_qemu_rdma_init_ram_blocks(local->nb_blocks);
> - rdma->dest_blocks = (RDMADestBlock *) g_malloc0(sizeof(RDMADestBlock) *
> - rdma->local_ram_blocks.nb_blocks);
> + rdma->dest_blocks = g_new0(RDMADestBlock,
> + rdma->local_ram_blocks.nb_blocks);
> local->init = true;
> return 0;
> }
> @@ -677,8 +677,7 @@ static int rdma_delete_block(RDMAContext *rdma, RDMALocalBlock *block)
>
> if (local->nb_blocks > 1) {
>
> - local->block = g_malloc0(sizeof(RDMALocalBlock) *
> - (local->nb_blocks - 1));
> + local->block = g_new0(RDMALocalBlock, local->nb_blocks - 1);
>
> if (block->index) {
> memcpy(local->block, old, sizeof(RDMALocalBlock) * block->index);
> @@ -1164,7 +1163,7 @@ static int qemu_rdma_register_and_get_keys(RDMAContext *rdma,
>
> /* allocate memory to store chunk MRs */
> if (!block->pmr) {
> - block->pmr = g_malloc0(block->nb_chunks * sizeof(struct ibv_mr *));
> + block->pmr = g_new0(struct ibv_mr *, block->nb_chunks);
> }
>
> /*
> @@ -2494,7 +2493,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
> InetSocketAddress *addr;
>
> if (host_port) {
> - rdma = g_malloc0(sizeof(RDMAContext));
> + rdma = g_new0(RDMAContext, 1);
> rdma->current_index = -1;
> rdma->current_chunk = -1;
>
> @@ -3399,7 +3398,7 @@ static void *qemu_fopen_rdma(RDMAContext *rdma, const char *mode)
> return NULL;
> }
>
> - r = g_malloc0(sizeof(QEMUFileRDMA));
> + r = g_new0(QEMUFileRDMA, 1);
> r->rdma = rdma;
>
> if (mode[0] == 'w') {
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 33e55fe..7914f86 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -480,7 +480,7 @@ int register_savevm_live(DeviceState *dev,
> {
> SaveStateEntry *se;
>
> - se = g_malloc0(sizeof(SaveStateEntry));
> + se = g_new0(SaveStateEntry, 1);
> se->version_id = version_id;
> se->section_id = savevm_state.global_section_id++;
> se->ops = ops;
> @@ -498,7 +498,7 @@ int register_savevm_live(DeviceState *dev,
> pstrcat(se->idstr, sizeof(se->idstr), "/");
> g_free(id);
>
> - se->compat = g_malloc0(sizeof(CompatEntry));
> + se->compat = g_new0(CompatEntry, 1);
> pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), idstr);
> se->compat->instance_id = instance_id == -1 ?
> calculate_compat_instance_id(idstr) : instance_id;
> @@ -526,7 +526,7 @@ int register_savevm(DeviceState *dev,
> LoadStateHandler *load_state,
> void *opaque)
> {
> - SaveVMHandlers *ops = g_malloc0(sizeof(SaveVMHandlers));
> + SaveVMHandlers *ops = g_new0(SaveVMHandlers, 1);
> ops->save_state = save_state;
> ops->load_state = load_state;
> return register_savevm_live(dev, idstr, instance_id, version_id,
> @@ -568,7 +568,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
> /* If this triggers, alias support can be dropped for the vmsd. */
> assert(alias_id == -1 || required_for_version >= vmsd->minimum_version_id);
>
> - se = g_malloc0(sizeof(SaveStateEntry));
> + se = g_new0(SaveStateEntry, 1);
> se->version_id = vmsd->version_id;
> se->section_id = savevm_state.global_section_id++;
> se->opaque = opaque;
> @@ -582,7 +582,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
> pstrcat(se->idstr, sizeof(se->idstr), "/");
> g_free(id);
>
> - se->compat = g_malloc0(sizeof(CompatEntry));
> + se->compat = g_new0(CompatEntry, 1);
> pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), vmsd->name);
> se->compat->instance_id = instance_id == -1 ?
> calculate_compat_instance_id(vmsd->name) : instance_id;
> @@ -1544,7 +1544,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
> return;
> }
>
> - available_snapshots = g_malloc0(sizeof(int) * nb_sns);
> + available_snapshots = g_new0(int, nb_sns);
> total = 0;
> for (i = 0; i < nb_sns; i++) {
> sn = &sn_tab[i];
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense
2015-09-14 11:51 [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-09-14 15:51 ` Eric Blake
2015-09-15 1:10 ` zhanghailiang
@ 2015-09-15 10:25 ` Amit Shah
2 siblings, 0 replies; 4+ messages in thread
From: Amit Shah @ 2015-09-15 10:25 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel, quintela
On (Mon) 14 Sep 2015 [13:51:31], Markus Armbruster wrote:
> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
> for two reasons. One, it catches multiplication overflowing size_t.
> Two, it returns T * rather than void *, which lets the compiler catch
> more type errors.
>
> This commit only touches allocations with size arguments of the form
> sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Amit
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-15 10:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 11:51 [Qemu-devel] [PATCH] migration: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-09-14 15:51 ` Eric Blake
2015-09-15 1:10 ` zhanghailiang
2015-09-15 10:25 ` Amit Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).