Message ID | 20171006235023.11952-11-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="nPJ9PIJR"; 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 3y86D76wD1z9t3R for <incoming@patchwork.ozlabs.org>; Sat, 7 Oct 2017 11:03:35 +1100 (AEDT) Received: from localhost ([::1]:47587 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 1e0cac-0000fk-3N for incoming@patchwork.ozlabs.org; Fri, 06 Oct 2017 20:03:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cOb-00075s-Nr for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1e0cOa-0004vQ-JC for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:09 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:54803) 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 1e0cOa-0004vF-Ee; Fri, 06 Oct 2017 19:51:08 -0400 Received: by mail-qt0-x242.google.com with SMTP id i13so34322831qtc.11; Fri, 06 Oct 2017 16:51:08 -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=ZOe/uBesE5oQrH2gITAOw1oHGOzwjO+th/DgyqiJanw=; b=nPJ9PIJRjudcPAY/oixx5n8jfOIcs94dl2pKGX/S1RwwCMOr3b92pcLkxY2KLGphOm yzPbElIazm2inKWGOsQgXrZoeCM6zsBlQiF3L7+d0MwxgnQSwfHxjUYg4WztyKyK1dxn b5/O7DpohLGRAxfY4W5/+Da/lkdvymcOrZck0GBDLCgMELnn53BcLas9aYRbikK721O6 NIKijiVi972SAnQ6B7Ih8DDvrePL5L2uFAmkyJXYZb2Sc37Dv+ZvfmqgOPKOyvA1W+Zw mE07vSTGwWJCRrICpzjqtjsWmRAyIgwc9rdY/CT4ZnvyrWnmyipRXRcIscYjVA0BlCMr pn+w== 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=ZOe/uBesE5oQrH2gITAOw1oHGOzwjO+th/DgyqiJanw=; b=nFwbnINg17XDV8BkLluDZk2Oj5YUw2d5U6lmbWizFqW70JsI9vHyaK0CM9kbQcAYWC 0Gt7AOC8KpRJoUWmEslZhFAhNlg22HpEeF7yqrzn5w1mEz1iT9142mV6YKIp+9cmkwt+ Kx8JKdFm70pm2v7RQ5fUnLwkgPm6v3aL+EEWsPjhLXlJ40oyH6JFvC0ENMK4Lm83fYLX s1zvvNRN6Z2jHYzX/qP7obzFg3VVLXy/VhEMoHjIpjmVzb3ChsKX1DD952ExhkBZyynv K3jkyEGxDHd8VRJJQZOathsw03Ixpw5+E5/LApB97Cob500R1pAl/BJFjBpMs/8mEw90 Luiw== X-Gm-Message-State: AMCzsaUxmoOimdki12O7MHjkgWYmnZW36NN5IBGFotxMxiod5hyN800x qH3qxls6kSkXdhxmOAclq7A= X-Google-Smtp-Source: AOwi7QCLxKFG+HWYG1MaNy4ipWJr3UyPOGTjinQU6iUdgpJil/TGQ8LxS/NexP4slR2JQjjtApirlg== X-Received: by 10.200.39.205 with SMTP id x13mr5236262qtx.287.1507333867948; Fri, 06 Oct 2017 16:51:07 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id g1sm1705226qta.95.2017.10.06.16.51.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 16:51:07 -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>, Paolo Bonzini <pbonzini@redhat.com> Date: Fri, 6 Oct 2017 20:49:05 -0300 Message-Id: <20171006235023.11952-11-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::242 Subject: [Qemu-devel] [PATCH 10/88] Character devices: 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>, qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.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/char/parallel.c b/hw/char/parallel.c index f79dc76543..da8566538e 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -614,7 +614,7 @@ bool parallel_mm_init(MemoryRegion *address_space, { ParallelState *s; - s = g_malloc0(sizeof(ParallelState)); + s = g_new0(ParallelState, 1); s->irq = irq; qemu_chr_fe_init(&s->chr, chr, &error_abort); s->it_shift = it_shift; diff --git a/hw/char/serial.c b/hw/char/serial.c index 376bd2f240..dcc25d649f 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -978,7 +978,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase, { SerialState *s; - s = g_malloc0(sizeof(SerialState)); + s = g_new0(SerialState, 1); s->irq = irq; s->baudbase = baudbase; @@ -1034,7 +1034,7 @@ SerialState *serial_mm_init(MemoryRegion *address_space, { SerialState *s; - s = g_malloc0(sizeof(SerialState)); + s = g_new0(SerialState, 1); s->it_shift = it_shift; s->irq = irq; diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 835b5378a0..0d1a67d450 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -365,7 +365,7 @@ void sh_serial_init(MemoryRegion *sysmem, { sh_serial_state *s; - s = g_malloc0(sizeof(sh_serial_state)); + s = g_new0(sh_serial_state, 1); s->feat = feat; s->flags = SH_SERIAL_FLAG_TEND | SH_SERIAL_FLAG_TDE;