Message ID | 20171006235023.11952-84-f4bug@amsat.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="H+IQ1+FL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y87LW1kBHz9t5Y for <incoming@patchwork.ozlabs.org>; Sat, 7 Oct 2017 11:54:07 +1100 (AEDT) Received: from localhost ([::1]:47907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1e0dNV-0003XR-DK for incoming@patchwork.ozlabs.org; Fri, 06 Oct 2017 20:54:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cSl-0002hf-F0 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cSk-0008V5-OU for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:55:27 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:52776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cSk-0008UH-8X; Fri, 06 Oct 2017 19:55:26 -0400 Received: by mail-qt0-x244.google.com with SMTP id o52so34330922qtc.9; Fri, 06 Oct 2017 16:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=era+XnocuyRf561qAOJ7vKj2ffEpWucxQRSEif3klIs=; b=H+IQ1+FLPi7lu3IV9dMpBpagN/UTM2fRIM5dVs0kHvZv2CgB8gMJT+pfLJSZxOCKeN 2/VmaT1GghgnVBrJLGlNhzw9U944ishdYG1U4cwQCBupRJvA2qrUgIdt7j+3iOqUJ3VT fhFc46W9uTPAYcuxVNp+RHBWO6KYcPXJ7ZMay7F6o+S7FXRlXoGCE05moBGESt00m6B7 1vX+Ppp9NZ6ALFF7Db9JobQB08+mDVaCVjoNrmxHGoXaunJcusXAYYtNzRRd4dQ8E0Cu W/xCM4exe7eIqq7bR3ed3kwTQpjta4ZNR7qBRg33Dho94hAVJIKq4ftf+Z6JCs+Ini2C YNsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=era+XnocuyRf561qAOJ7vKj2ffEpWucxQRSEif3klIs=; b=ku6KtYKbPmmzuGWxPGUVhPrEuLfB6WeNZIqQEHmXaD2NxMBP/1Rhmw3JS9GYxg0jz+ KNzQrXTb/4ebqHoRIdH7v2CQnnYEiP6nJRWqNqtgX7rGzNIc6C9U95k52TwuGhDIEjlA FynrJu8lnx9dZczWSPEGt1Fo1eMzvLemSUn223BgF+fGASfEMJMIQAe3nbamXfYeIjai sEyKOBW387i+45Yzr3nmwRG2VWeBlNcCkFN0M4sfF4duhjBqOj5wu3SDjDxEQWnKA0AA IqajpHlJM7IAge2V1qDh8mcTid7csXnyLmSa18UpcnQGvf6Z010dA3IDpPCotR7pg7UI ZZqw== X-Gm-Message-State: AMCzsaV93nadLMsZ/Yx+NA/bUOuj/rOyZdnUJo6b0U085o8BQSntaJsf 3eSoAcrFvYCsvp9JmeeYREAVd/Rpv4A= X-Google-Smtp-Source: AOwi7QCXlpJ52klj9OMIdhPY7fIlLAfpBMPu17jWCCDaeAO/+Bz7nNWeRIwrn3tqWCgoFOJSd26lfw== X-Received: by 10.200.22.231 with SMTP id y36mr5548078qtk.31.1507334125755; Fri, 06 Oct 2017 16:55:25 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id g1sm1705226qta.95.2017.10.06.16.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 16:55:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@gmail.com>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel@redhat.com> Date: Fri, 6 Oct 2017 20:50:18 -0300 Message-Id: <20171006235023.11952-84-f4bug@amsat.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171006235023.11952-1-f4bug@amsat.org> References: <20171006235023.11952-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH 83/88] hw/pci: use g_new() family of functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Kevin Wolf <kwolf@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, qemu trival <qemu-trivial@nongnu.org>, =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= <f4bug@amsat.org>, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
use g_new() family of functions
|
expand
|
diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1e6fb88eba..32625d9fcc 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1644,7 +1644,7 @@ static PciMemoryRegionList *qmp_query_pci_regions(const PCIDevice *dev) continue; } - region = g_malloc0(sizeof(*region)); + region = g_new0(PciMemoryRegionList, 1); region->value = g_malloc0(sizeof(*region->value)); if (r->type & PCI_BASE_ADDRESS_SPACE_IO) { diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c index 6432b9ac1f..236d8bc4db 100644 --- a/hw/pci/pcie_port.c +++ b/hw/pci/pcie_port.c @@ -72,7 +72,7 @@ void pcie_chassis_create(uint8_t chassis_number) if (c) { return; } - c = g_malloc0(sizeof(*c)); + c = g_new0(struct PCIEChassis, 1); c->number = chassis_number; QLIST_INIT(&c->slots); QLIST_INSERT_HEAD(&chassis, c, next); diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c index ded1c54c06..cde5e0a627 100644 --- a/tests/libqos/pci-pc.c +++ b/tests/libqos/pci-pc.c @@ -119,7 +119,7 @@ QPCIBus *qpci_init_pc(QGuestAllocator *alloc) { QPCIBusPC *ret; - ret = g_malloc(sizeof(*ret)); + ret = g_new(QPCIBusPC, 1); ret->bus.pio_readb = qpci_pc_pio_readb; ret->bus.pio_readw = qpci_pc_pio_readw; diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 0b73cb23d0..9dd689c7b5 100644 --- a/tests/libqos/pci.c +++ b/tests/libqos/pci.c @@ -54,7 +54,7 @@ QPCIDevice *qpci_device_find(QPCIBus *bus, int devfn) { QPCIDevice *dev; - dev = g_malloc0(sizeof(*dev)); + dev = g_new0(QPCIDevice, 1); dev->bus = bus; dev->devfn = devfn;
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/pci/pci.c | 2 +- hw/pci/pcie_port.c | 2 +- tests/libqos/pci-pc.c | 2 +- tests/libqos/pci.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)