From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070532; cv=none; d=zohomail.com; s=zohoarc; b=OFPOd8JDpmnMJeMrkAX96fp2Ws9WjSgPGhPuIbxuYn11fPe3/ZE6G0ZYowMwugDQgIn+WmxB1j+xAD0bYvTrN6VgwRdE8Xkv2uacdCChrT+irK3E63p25yD0fBshtt2VxCzU8cahkvoWps2lDLqAnuNgwTvmk3b5e1jE7KezTeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070532; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5KAYO+0h8ZQxRxgYz9uAXRTT1/AuPGKR8+IVzR2phew=; b=YK/fox36v52dbLK6kAOoKHify9jr20DJVn1aW8B6SB0GQxz+2csbolAcwnVAXcnaryYJbIf3JdH0VlfSoYlQ17v2eFZLNh9cvyMMu+5vWRoZligmvjWtVNy7pyXtFSr4Ogkn1+GTBLYuhNGw+F2Tx/v5SCMFv+PQ8m/lC55Kw6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1600070532742682.090940611424; Mon, 14 Sep 2020 01:02:12 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-kZVSA13ROD-PNDTTBx4fNA-1; Mon, 14 Sep 2020 04:02:08 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BF981005E6E; Mon, 14 Sep 2020 08:02:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2768E1002D4E; Mon, 14 Sep 2020 08:02:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E6A158C7C1; Mon, 14 Sep 2020 08:02:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E821X9008636 for ; Mon, 14 Sep 2020 04:02:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 928591A837; Mon, 14 Sep 2020 08:02:01 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD68519C66; Mon, 14 Sep 2020 08:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070531; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5KAYO+0h8ZQxRxgYz9uAXRTT1/AuPGKR8+IVzR2phew=; b=UO651fWrddiL01hYKw3cXfBzbWekrtB0w8by6ybmihueoNTJ05uf3RFONsRVXppVnC4cj4 lAbvXWrb9XgebQ+XmMNtxKxBSX7dJW9tzctgEnLIf07YWO1zdtFu9Ppgjx2PfWAalyBneX qs75NoZ1FicyBFTN2dMFviDuY530lSc= X-MC-Unique: kZVSA13ROD-PNDTTBx4fNA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/7] tests: Fix false positive in testConfRoundTrip. Date: Mon, 14 Sep 2020 10:01:48 +0200 Message-Id: <20200914080154.26361-2-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" testConfRoundTrip would return 0 (success) if virConfWriteMem returned 0 (n= othing written) and virTestCompareToFile failed. Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- tests/virconftest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/virconftest.c b/tests/virconftest.c index ab29b5b712..cac3718495 100644 --- a/tests/virconftest.c +++ b/tests/virconftest.c @@ -51,8 +51,7 @@ static int testConfRoundTrip(const void *opaque) fprintf(stderr, "Failed to process %s\n", srcfile); goto cleanup; } - ret =3D virConfWriteMem(buffer, &len, conf); - if (ret < 0) { + if (virConfWriteMem(buffer, &len, conf) < 0) { fprintf(stderr, "Failed to serialize %s back\n", srcfile); goto cleanup; } --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070535; cv=none; d=zohomail.com; s=zohoarc; b=WkieM7cci1lNZ+1OGU9oCLeWpsp5hJQ4Xagy7a5FodcamfO+9ZXJDl8lJlgThs4lR9CGbKcFYtXMDHxLseP+Q5AUpHfkE/KQZpWLYS4EzPt108OgXmXqNXGA+m9ncpUHKzhrHdToRrYi4XeLPuomjTR+kbTNpII5LTUG5Te+r3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070535; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KinCrFZXsAr9PCXpffAZ6XUKKvYR6aHy7IYgsj7q++w=; b=FGBKBWWAD/N4rv3PQDDT2rYEuZbid9a5oV3Pd4C0IA+w09afBLlUBONdo+f1qD4WMqG9ko+fqrIWOGZ8MDnG1tGMOGmdR8uPuMAWaQqm0M4Y4ZgbqWz8s/TsLTolXDxeD4y30d7t4LNv2Y/Sj7KS94bO9hn9QHK4Ihn/eeq4iJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1600070535184844.1744102784273; Mon, 14 Sep 2020 01:02:15 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-j2cACxWTMcelnmchVpKP7w-1; Mon, 14 Sep 2020 04:02:11 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86592801AB1; Mon, 14 Sep 2020 08:02:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63C237A414; Mon, 14 Sep 2020 08:02:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 328958C7C6; Mon, 14 Sep 2020 08:02:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E825o1008749 for ; Mon, 14 Sep 2020 04:02:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id B7E111A8EC; Mon, 14 Sep 2020 08:02:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEEEA1A268; Mon, 14 Sep 2020 08:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070534; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KinCrFZXsAr9PCXpffAZ6XUKKvYR6aHy7IYgsj7q++w=; b=THhg5Oj/XzgZeswwycmivE/ayW3BrOIksDZs8QNGeP42sK+6DWYhtYEptbHhaYI0P46oGm p8Zlpp2xj+TtJlTHMGDg30YU0VNCx8Az4CafZ12qeKNRWVKTlTJesPMJEnuu6aZkEZkLRT PJVQa5zPr0YNUC62Gw2/c9l/E0oGitU= X-MC-Unique: j2cACxWTMcelnmchVpKP7w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/7] util: Use glib memory functions in virErrorCopyNew Date: Mon, 14 Sep 2020 10:01:49 +0200 Message-Id: <20200914080154.26361-3-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/util/virerror.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index 6b057057a3..d89948f198 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -223,14 +223,8 @@ virCopyError(virErrorPtr from, virErrorPtr virErrorCopyNew(virErrorPtr err) { - virErrorPtr ret; - - if (VIR_ALLOC_QUIET(ret) < 0) - return NULL; - - if (virCopyError(err, ret) < 0) - VIR_FREE(ret); - + virErrorPtr ret =3D g_new0(virError, 1); + virCopyError(err, ret); return ret; } =20 --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070537; cv=none; d=zohomail.com; s=zohoarc; b=H207pjnasLUd2ASb1bqfICxXuXpxwW9UJEN8PhCb1I+Qp5qBm4AXHMUtj0Hf8Auk42Itl9kn3q5XZSU+9sgmkL+cM3e4K4Q/kBhZOhCtc9f2/wgtixciPp/M6HaI7f0KeA+TX10CNmtlA0FBkKvlWJghfttVInN2Yk9MrBhI26A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070537; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g9zh2CSROV5yrsy/JXdqDz238bcEorGn1cpobkNdjy4=; b=fqJo2RGwXDtcRR7syEFJ/fAc0x+baJagKOzaSEW3sAbp9I9NIYBBOMo6N6Jul1h1zrVpr3XQVeTJdu1HnEV5hfNe2n/Ska66ULKrlyAWrKD7p2m7O+qYv9jzupyfmQ3Nzo9XCWwyxSYMsXU+6snrJfAY9sQcLGFV2qc4I+Yi460= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1600070537954315.14865543076337; Mon, 14 Sep 2020 01:02:17 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-Q245nbQRN7aE6VCHJIOYiQ-1; Mon, 14 Sep 2020 04:02:14 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C11281005E6D; Mon, 14 Sep 2020 08:02:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0A365DA60; Mon, 14 Sep 2020 08:02:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6F2048C7C9; Mon, 14 Sep 2020 08:02:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E8265n008783 for ; Mon, 14 Sep 2020 04:02:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id D526D1A8AC; Mon, 14 Sep 2020 08:02:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18C9A19C66; Mon, 14 Sep 2020 08:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070536; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g9zh2CSROV5yrsy/JXdqDz238bcEorGn1cpobkNdjy4=; b=W63wdDdcf0A2I84ouwQE2VOEjJeUFA6DX6+sVmbApA1x/KsqEgnYU4CTv/s/DRyWRuaNRV q5/09qfhwKsoTJytpbFt2G7CwfsTI8K6GzpAs1pQNGQ6M70ry4GTczTGy8lT5fmD0/ktaL aHEvZJMiOSXbpY5G0RqsRnqzMH5ko9A= X-MC-Unique: Q245nbQRN7aE6VCHJIOYiQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/7] util: Use glib memory functions in virLastErrorObject Date: Mon, 14 Sep 2020 10:01:50 +0200 Message-Id: <20200914080154.26361-4-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/util/virerror.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index d89948f198..80a7cfe0ed 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -235,10 +235,9 @@ virLastErrorObject(void) virErrorPtr err; err =3D virThreadLocalGet(&virLastErr); if (!err) { - if (VIR_ALLOC_QUIET(err) < 0) - return NULL; + err =3D g_new0(virError, 1); if (virThreadLocalSet(&virLastErr, err) < 0) - VIR_FREE(err); + g_clear_pointer(&err, g_free); } return err; } --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070586; cv=none; d=zohomail.com; s=zohoarc; b=XmX1ZhknM3KA1MfMsvIxUnwVEp50FrGRXMKrZF21CWIu/NRVc3+YmJmsRZ/qokmqrxnUmBUpK+7Z7jfkA729AxzaeD+g8tbPCNka7/z2Cai5aRRR7VfF+Ue6v5s7gdQO2djbViWnZcBDL/czToMqsotqLCvOfI6HdeDIKoigmRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070586; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=70sAIFxjGBjbwK3G7q6M8K8icPt0ecktu//3U27jFiw=; b=iXb0VMJ4JeYfd2cuaE8AJpwxg6Vtp7nxVGFnspwEIq43FrH8rHBQB1MtjRBQj8CKvmz4FUToB4OLJWwpokCvUMTBxJjGmKM83NgXvKZ9sgeH+qgbtfyGm0tKut2zLCLFEb8OjODcQs+2F7KGKMJXZfbWlyWixzyyC7tTqBXo8QU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1600070586878559.9627766945875; Mon, 14 Sep 2020 01:03:06 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-45-0Ei0mgLZOyOWt8AOqsaueA-1; Mon, 14 Sep 2020 04:02:18 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EE88801F95; Mon, 14 Sep 2020 08:02:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36CFA7513D; Mon, 14 Sep 2020 08:02:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0049A8C7D0; Mon, 14 Sep 2020 08:02:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E82Bxo008799 for ; Mon, 14 Sep 2020 04:02:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id A1B061A268; Mon, 14 Sep 2020 08:02:11 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38FE919C66; Mon, 14 Sep 2020 08:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070585; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=70sAIFxjGBjbwK3G7q6M8K8icPt0ecktu//3U27jFiw=; b=MccY9OuKkGVIMMPSmvVhC/Rfe6FHWLmYTNJQZ5nVKePrbg4yMgtM4TX2X6TpWm4QrOhNzk seJMXcppgVahL1iCLv8gQYrmw5v8/ku46U7SBIR2pXoUtD8De1JeWW4BSB1AE3fQPGsRwl MrblApqJa4IjWtF+HT/7nGPCzQxSSok= X-MC-Unique: 0Ei0mgLZOyOWt8AOqsaueA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 4/7] util: Remove VIR_ALLOC_QUIET Date: Mon, 14 Sep 2020 10:01:51 +0200 Message-Id: <20200914080154.26361-5-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/util/viralloc.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index 3e57d8a603..fa2bc8a2bc 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -75,20 +75,6 @@ void virDisposeString(char **strptr) */ #define VIR_ALLOC(ptr) virAlloc(&(ptr), sizeof(*(ptr))) =20 -/** - * VIR_ALLOC_QUIET: - * @ptr: pointer to hold address of allocated memory - * - * Allocate sizeof(*ptr) bytes of memory and store - * the address of allocated memory in 'ptr'. Fill the - * newly allocated memory with zeros. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 on success, aborts on OOM - */ -#define VIR_ALLOC_QUIET(ptr) VIR_ALLOC(ptr) - /** * VIR_ALLOC_N: * @ptr: pointer to hold address of allocated memory --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070584; cv=none; d=zohomail.com; s=zohoarc; b=Qv2m+9t6wu+QcWptMgOEbTS7zL+pS674Wp9/5oaVYN2ltwN0GzHtgpClGPXWD6aaaoIi2JJ1PaGCG63buZZBCGQ9DSa8QuZfDaCc8sCojtc4cIkZ2s5UUOhmW+ewaNa2wt7vZZhJNgLm7cPAXlC7KNxncTUTFV59DIUnsouvdoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070584; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YW9AP6YjfqN2ti8XGcn+8v+nUy6JroT17qUfhWTdQ4M=; b=WUfh0h0/wROh/6YamBaBrAgJW1ulLKoXb5zFJF0eMJ/YsEKVyhd0UtVEzvrNOgEfyM4xSfR6Wwwxc9EqQucrpI2NAL+ycLGxICqAWMKqg9nmpDBpMknLIYNYXfjavOIk5RRftD2VA5nRTGXemL3/CZqOwDtXkfTulE0vidXAaWM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1600070584256120.52622019446562; Mon, 14 Sep 2020 01:03:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-QF9EhCjcMxaUUuoljVYacA-1; Mon, 14 Sep 2020 04:02:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFA2CAF20C; Mon, 14 Sep 2020 08:02:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAF4B60F96; Mon, 14 Sep 2020 08:02:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 777601832FDB; Mon, 14 Sep 2020 08:02:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E82C2e008808 for ; Mon, 14 Sep 2020 04:02:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id BE5E51A837; Mon, 14 Sep 2020 08:02:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0480719C66; Mon, 14 Sep 2020 08:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070583; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YW9AP6YjfqN2ti8XGcn+8v+nUy6JroT17qUfhWTdQ4M=; b=WeoAiDREiIwEAixlNdI64BUz3IyTRj4GFwj6WAizhCsZLt2FQYEXxpLLldkhoK3SA7lCDW uL/KSap2d5JY4b2mmZenhFb5zcxG+/qtvhtD50xNnqMVUHch+NFj3rnqL8fXbwrq6hdsP0 Z7KK5x6zwxPE8yM1bC+MIzqOmTgLnnk= X-MC-Unique: QF9EhCjcMxaUUuoljVYacA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 5/7] tests: Use glib memory function in testConfRoundTrip Date: Mon, 14 Sep 2020 10:01:52 +0200 Message-Id: <20200914080154.26361-6-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- tests/virconftest.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/tests/virconftest.c b/tests/virconftest.c index cac3718495..8269730662 100644 --- a/tests/virconftest.c +++ b/tests/virconftest.c @@ -32,39 +32,30 @@ static int testConfRoundTrip(const void *opaque) { const char *name =3D opaque; - int ret =3D -1; g_autoptr(virConf) conf =3D NULL; int len =3D 10000; - char *buffer =3D NULL; - char *srcfile =3D NULL; - char *dstfile =3D NULL; + g_autofree char *buffer =3D NULL; + g_autofree char *srcfile =3D NULL; + g_autofree char *dstfile =3D NULL; =20 srcfile =3D g_strdup_printf("%s/virconfdata/%s.conf", abs_srcdir, name= ); dstfile =3D g_strdup_printf("%s/virconfdata/%s.out", abs_srcdir, name); =20 - if (VIR_ALLOC_N_QUIET(buffer, len) < 0) { - fprintf(stderr, "out of memory\n"); - goto cleanup; - } + buffer =3D g_new0(char, len); conf =3D virConfReadFile(srcfile, 0); if (conf =3D=3D NULL) { fprintf(stderr, "Failed to process %s\n", srcfile); - goto cleanup; + return -1; } if (virConfWriteMem(buffer, &len, conf) < 0) { fprintf(stderr, "Failed to serialize %s back\n", srcfile); - goto cleanup; + return -1; } =20 if (virTestCompareToFile(buffer, dstfile) < 0) - goto cleanup; + return -1; =20 - ret =3D 0; - cleanup: - VIR_FREE(srcfile); - VIR_FREE(dstfile); - VIR_FREE(buffer); - return ret; + return 0; } =20 =20 --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070546; cv=none; d=zohomail.com; s=zohoarc; b=DfIH+sFeBEeSR8ehO2sMoiWhgNC5sSq0KTnphkYxcvuJ9FSywpZmdKsUKuBU+tyrBI4+HJh7xzLoRybq7++S+5cBVUIo48estdgUeF+bO+f9Qc06Q7XnZJnlIpTAI0b4nyGg4b0CYnUNPKYTdGgrwYxkGw3EO5QLa+Jk56gnQvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070546; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XHa8vB2nrN3x2AqVOi+vQ9tw3Qz6T4ve+CgA8bNftE0=; b=a8J3Dn6li+tfxrflKTJxCb8+C0rhTr6nGyItdeGVgOZ5eDF7O5ZUHyEMrCcbLADJYzdlx211Djw/uhWVyMU6g83AgjgfEwGu9RnNwap/YKC3fOQ4ZsvjQHpF/kQyWtLoueMZJW1oReZFsQR/u35Y5450n4+3MGU25OY4IXh/OTw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 160007054661530.987678880936755; Mon, 14 Sep 2020 01:02:26 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-3XgEOYDmMiCdqL0MvzIfmw-1; Mon, 14 Sep 2020 04:02:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6E3C8AF212; Mon, 14 Sep 2020 08:02:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BFA160F96; Mon, 14 Sep 2020 08:02:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 17A711832FE0; Mon, 14 Sep 2020 08:02:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E82DuJ008818 for ; Mon, 14 Sep 2020 04:02:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6EA21A268; Mon, 14 Sep 2020 08:02:13 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2079819C66; Mon, 14 Sep 2020 08:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070545; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XHa8vB2nrN3x2AqVOi+vQ9tw3Qz6T4ve+CgA8bNftE0=; b=QI1HVfORh3TREs1t6XkczTyAqPOizSlUhm4HaoLWEvLrXddIYKiqIpgm/iIOi0Idemqgqt jRAqgM6z/Q4XsRslJP3/URwmBMfUcgvGEKv6YpCrGNQlIYNA23f4DbzWuPdahL5e2qvsjB LxIckcdCkB4sg+Su8Ncvn/AkGbEQreA= X-MC-Unique: 3XgEOYDmMiCdqL0MvzIfmw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 6/7] util: Use glib memory functions in virJSONValueGetArrayAsBitmap Date: Mon, 14 Sep 2020 10:01:53 +0200 Message-Id: <20200914080154.26361-7-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/util/virjson.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index 6921eccb60..ba43d6b667 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1243,8 +1243,7 @@ virJSONValueGetArrayAsBitmap(const virJSONValue *val, if (val->type !=3D VIR_JSON_TYPE_ARRAY) return -1; =20 - if (VIR_ALLOC_N_QUIET(elems, val->data.array.nvalues) < 0) - return -1; + elems =3D g_new0(unsigned long long, val->data.array.nvalues); =20 /* first pass converts array members to numbers and finds the maximum = */ for (i =3D 0; i < val->data.array.nvalues; i++) { --=20 2.26.2 From nobody Fri Apr 26 12:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600070588; cv=none; d=zohomail.com; s=zohoarc; b=Qp7xE+0Z2xS+7Iz6llGpcF2yiw6++vpBusTVQzK4VoATdHjP4Aasvzmz9q4KXBVvc/A8MaZe9nNEZsCu1um2KICvfgWx38Wl6zvZ1d/+6Rh3EBXWxCDH8kLJIYZkeIPRWrYeupUcihTv11i5Od1bzLFQrOG6W/prkSu9K+vzN6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600070588; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uUuGofRZucuXQbM4vsQYMAoK+4PYdvJzxRONF42GIcA=; b=XE9FW0raea8aH5VzzY7s+H35MDW9C9UBOcFIR1M/stlZp/kwIZn9M4Lksq+81BjCfOzF9oBe/fNMJVDfIOF7pQCX8SKjOxdbBeOTLTEHjr2Rber0GPie9k3SMwIl7eFJZoxTk4IO9H6Ok9fxSRIk9g5SCdoqGA/Vk2hAHQXUFTQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1600070588013811.5831640606638; Mon, 14 Sep 2020 01:03:08 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-L19TaWSXPjev9zVveCWcFQ-1; Mon, 14 Sep 2020 04:02:22 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08CAC802B68; Mon, 14 Sep 2020 08:02:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D63727513D; Mon, 14 Sep 2020 08:02:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9E0368C7CA; Mon, 14 Sep 2020 08:02:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E82F5Q008832 for ; Mon, 14 Sep 2020 04:02:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 317EA1A268; Mon, 14 Sep 2020 08:02:15 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-156.ams2.redhat.com [10.36.112.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3AA1819C66; Mon, 14 Sep 2020 08:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600070586; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uUuGofRZucuXQbM4vsQYMAoK+4PYdvJzxRONF42GIcA=; b=dWEWB9LAOVflQmAFLeUDk4hDSg2gW3JhrXwmcv7YLr5XLxexE2jlu0Yrk7wUHQJ2W3LriK 0PCLFylwtL8GL8HakxV6V2JIJDv2gbzg+dWd9Jle0Zzs3teWHRvfv419ZpZ0af8vXQxdXN GPPnhvy46zSQ3Z1MYReLFFNRcPZHesY= X-MC-Unique: L19TaWSXPjev9zVveCWcFQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 7/7] util: Remove VIR_ALLOC_N_QUIET Date: Mon, 14 Sep 2020 10:01:54 +0200 Message-Id: <20200914080154.26361-8-twiederh@redhat.com> In-Reply-To: <20200914080154.26361-1-twiederh@redhat.com> References: <20200914080154.26361-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/util/viralloc.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index fa2bc8a2bc..a50cd5d632 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -90,21 +90,6 @@ void virDisposeString(char **strptr) */ #define VIR_ALLOC_N(ptr, count) virAllocN(&(ptr), sizeof(*(ptr)), (count)) =20 -/** - * VIR_ALLOC_N_QUIET: - * @ptr: pointer to hold address of allocated memory - * @count: number of elements to allocate - * - * Allocate an array of 'count' elements, each sizeof(*ptr) - * bytes long and store the address of allocated memory in - * 'ptr'. Fill the newly allocated memory with zeros. - * - * This macro is safe to use on arguments with side effects. - * - * Returns 0 on success, aborts on OOM - */ -#define VIR_ALLOC_N_QUIET(ptr, count) VIR_ALLOC_N(ptr, count) - /** * VIR_REALLOC_N: * @ptr: pointer to hold address of allocated memory --=20 2.26.2