]> git.proxmox.com Git - mirror_qemu.git/commit
scsi: Fuse g_malloc(); memset() into g_malloc0()
authorMarkus Armbruster <armbru@redhat.com>
Thu, 4 Dec 2014 13:12:44 +0000 (14:12 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 11:21:02 +0000 (12:21 +0100)
commit0bd0adbe5b438cabbf02230dba1be4c209158f57
treefd06c939ff9f1b3763fd805f53f471860e76a1cb
parent1c3381af327b5f94a10942a3c25777a57fcdd85e
scsi: Fuse g_malloc(); memset() into g_malloc0()

Coccinelle semantic patch:

    @@
    expression LHS, SZ;
    @@
    -       LHS = g_malloc(SZ);
    -       memset(LHS, 0, SZ);
    +       LHS = g_malloc0(SZ);

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c