From nobody Sun Apr 28 20:38:33 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=1626940248; cv=none; d=zohomail.com; s=zohoarc; b=PBUw9wtkXqTDHXDRASijZk2aEXQxlI4z7jN+5Si5+fb33mvXeVntFGBOZEO7AgpxJQ1/2lpjyGzdQOfudXkiwG9eh8g6AslVJzi2qgMSOZOXkQq9Q4kyBOlHi1thuV/YWvLZBqKeISIe3TA9JzVXW4Cdl7WR+n9tsqhGo+zWVuk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940248; 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=9sh+fGGHH5C1JvR7DE4VXkUsxT4l0yUwoKr+kNgE8vA=; b=I5tqKe8K974YL+q8yzuNCvt7F/p/aiPcfjPzfI31ejHlph3OdA8jX5ZLYt/KPKnVaa0N7XrMjaLeJqOW3r4jq3Uty0gqGxjKEhlRnPXOOg6fAK+kPqGZe6UDVeagXJpxxD8GyMEc1MTulmreW9n5INDP0McHbC00daQUCooTROI= 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) 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 1626940248484579.4060634471542; Thu, 22 Jul 2021 00:50:48 -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-537-JZywaIo2NDagjAWOtCJLFA-1; Thu, 22 Jul 2021 03:50:45 -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 D0952760C5; Thu, 22 Jul 2021 07:50:39 +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 A571810074E1; Thu, 22 Jul 2021 07:50:39 +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 3B1A21819AC2; Thu, 22 Jul 2021 07:50:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7oaWY009414 for ; Thu, 22 Jul 2021 03:50:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB2D11815B; Thu, 22 Jul 2021 07:50:36 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C5CA5D9DD; Thu, 22 Jul 2021 07:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940247; 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=9sh+fGGHH5C1JvR7DE4VXkUsxT4l0yUwoKr+kNgE8vA=; b=U9FWzVAMlZAYbk1h9lMueYieuzhZWSwapGtIAF2fxYYI3D6o+4eO9u2kir4vZIGNlnb2Q+ q0DObrAs+e3rHBqXBCiVZZG/pje5XIN8Mbdwb0SrANTkzBCKfP+4HFvPgV6UlodhPhRReH MxtagxU/1PtSYZPlFi66CDXluHPFETs= X-MC-Unique: JZywaIo2NDagjAWOtCJLFA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 01/38] virSystemdActivationNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:49:53 +0200 Message-Id: <20210722075030.25495-2-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940250321100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virsystemd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index 96f81cd3fa..6417dc6ea7 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -964,8 +964,7 @@ virSystemdActivationNew(virSystemdActivationMap *map, VIR_DEBUG("Activated with %d FDs", nfds); act =3D g_new0(virSystemdActivation, 1); =20 - if (!(act->fds =3D virHashNew(virSystemdActivationEntryFree))) - goto error; + act->fds =3D virHashNew(virSystemdActivationEntryFree); =20 fdnames =3D getenv("LISTEN_FDNAMES"); if (fdnames) { --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940251; cv=none; d=zohomail.com; s=zohoarc; b=GJdNKoV1Uu46V5OPHpfJFYItyTyxvYucn0XHiYEokI8vhZ4KEG6bibgYlIqrQ1E+bGn80KkeWGnwOXOGBeQpX9gVQz33wlsx25xL3RGnbmURdf54yVhrxoG1KMH3tUyhkiDqsp7Ovp8NWLN+YuciXZQrQDqzd0K7cESlm6Mv8nM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940251; 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=F+Lfa/5PjDTHOA80QB5IsH5fByjWiZ0Dy4tleDYOYKA=; b=Xicgl7KzPz1nS+9BWKin9YVLshgy7JfA7+lbISF/lLphoq5wVyMJS0DYsHQ1nxWQ90NLB/whVHSXugSbgj5hh2wol93Jkgtxc+W0GrxnNcAXGQqKZ5ZBJLhfLbP7caJBfMASMGkfFk0y9rBY06QiZuewgiAMmbElV3K2Y87Cjbs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 162694025155571.73817248661044; Thu, 22 Jul 2021 00:50:51 -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-344-adc0DEeDP-uwFRO0_lU6Gg-1; Thu, 22 Jul 2021 03:50:48 -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 E655F8015DB; Thu, 22 Jul 2021 07:50:43 +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 C4D9360936; Thu, 22 Jul 2021 07:50:43 +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 8FA47181A292; Thu, 22 Jul 2021 07:50:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7oe8p009431 for ; Thu, 22 Jul 2021 03:50:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 771785DAA5; Thu, 22 Jul 2021 07:50:40 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id C068C5DA2D; Thu, 22 Jul 2021 07:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940250; 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=F+Lfa/5PjDTHOA80QB5IsH5fByjWiZ0Dy4tleDYOYKA=; b=ZparAYaZ//v7IyyQreAYqfO6ZW0zwL1Bzq8/lD66//B86f+wlDjBKz9IDu6ZuqjZJU4eh5 o21Htd8s+8Np229YY45RHMhaOddktKUWwet8U1M2q6EsSZKV7ELz9y8dcFJQZYstBFPYhJ 6YkjFyJs1BjQu3aj36Ti+FwZcU7Rbfo= X-MC-Unique: adc0DEeDP-uwFRO0_lU6Gg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 02/38] virSystemdActivationNew: Use automatic memory management Date: Thu, 22 Jul 2021 09:49:54 +0200 Message-Id: <20210722075030.25495-3-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940252493100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virsystemd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index 6417dc6ea7..f90c17e767 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -958,11 +958,10 @@ virSystemdActivationNew(virSystemdActivationMap *map, size_t nmap, int nfds) { - virSystemdActivation *act; + g_autoptr(virSystemdActivation) act =3D g_new0(virSystemdActivation, 1= ); const char *fdnames; =20 VIR_DEBUG("Activated with %d FDs", nfds); - act =3D g_new0(virSystemdActivation, 1); =20 act->fds =3D virHashNew(virSystemdActivationEntryFree); =20 @@ -976,10 +975,9 @@ virSystemdActivationNew(virSystemdActivationMap *map, } =20 VIR_DEBUG("Created activation object for %d FDs", nfds); - return act; + return g_steal_pointer(&act); =20 error: - virSystemdActivationFree(act); return NULL; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940256; cv=none; d=zohomail.com; s=zohoarc; b=FOeblJdNfeU8RINVz/KPx8nupzL8PiKtRmBHnicNtaE+VpOoGoryvTQPATfWiibaFqG4k73sSzAcFVi4bn8k1h8wCE/i/Qsci3taP7e2l7+Of2WVfeXU4LObdf744t0TzXbe5AzxxW4SlQMduRTJ4RUoaB+ocFAAa3CDp5dgblI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940256; 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=APJaFCdzH59mc+21Ykgyxyrl+QsX1QyOaZtn1JPSVuM=; b=nLUfESQQ7bB3zUAXlE8WJnkUG7ZJniZUGeNLzcUnLIPCLdAkB7bPUwQaKQwHfQ08Q3PhtOGQQ88zqWPy2jSpaE9x5B86gro9CzwiLMWXXazHRHJdYOvB1Cx6KGsXOQkha2Tnxkf6SQl1RQRCi8dfHSggQyIpoXV0e9GruYlR5us= 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) 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 1626940256013882.6783439674994; Thu, 22 Jul 2021 00:50:56 -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-549-1fU636KwNA-Wmc5VqUntiA-1; Thu, 22 Jul 2021 03:50:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19F36804151; Thu, 22 Jul 2021 07:50:47 +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 F338960583; Thu, 22 Jul 2021 07:50:46 +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 C360C4A700; Thu, 22 Jul 2021 07:50:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ofec009436 for ; Thu, 22 Jul 2021 03:50:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7F5365DA2D; Thu, 22 Jul 2021 07:50:41 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9CEC5DAA5; Thu, 22 Jul 2021 07:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940255; 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=APJaFCdzH59mc+21Ykgyxyrl+QsX1QyOaZtn1JPSVuM=; b=CLLBxu+WChEKcYSMo1dQRignXK9hOzt3xgERyRcLFT+f19VrZ50RVRmcGp5QVaAW6pNwcR mWLH3Ci5MfmOUlIwNSMgiurI7F1kPDWXLmvni0Aj7D7it6hBW35F5flyhFDtoGVLFjZ9/7 2AOwIaXbrov2JwUYrvqfogL4tjs8H0U= X-MC-Unique: 1fU636KwNA-Wmc5VqUntiA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/38] virSystemdActivationNew: Remove superfluous `goto`s Date: Thu, 22 Jul 2021 09:49:55 +0200 Message-Id: <20210722075030.25495-4-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940256686100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virsystemd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index f90c17e767..99c92b6f52 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -968,17 +968,14 @@ virSystemdActivationNew(virSystemdActivationMap *map, fdnames =3D getenv("LISTEN_FDNAMES"); if (fdnames) { if (virSystemdActivationInitFromNames(act, nfds, fdnames) < 0) - goto error; + return NULL; } else { if (virSystemdActivationInitFromMap(act, nfds, map, nmap) < 0) - goto error; + return NULL; } =20 VIR_DEBUG("Created activation object for %d FDs", nfds); return g_steal_pointer(&act); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940253; cv=none; d=zohomail.com; s=zohoarc; b=kxV31PhSVNhNLs5wg/QfUHf+bSDtc49EABa2UvF+VOoVeSKEuhfA5CWLYKbiM4F2zhMsI9WT8p+14fXjoSmT+XNqJLkPcK0pJlnggR623CA1/ngqDkURNG3BGy7kGq4b7QY/vTY64T1cw3VcsFzh8oRC2+XS6WOWhhwmef4hqOI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940253; 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=XTvtdT//bri/RUOU5ClQQjdGcKsyI3D3rvhh+kMHPsc=; b=n0uyqqFUbMmLUB0Xs7WOsTs4w7jVUXhKATm2t5D3/Mr5CCiibSOJptywcbCr7OfrYEqXE0tnocuRunfNTS03Sf8bfmiWG0XmRgQuq76y9ZRDY1qUlE/dDVppK9gA3r02D5PHkzx5gdPiLb2wWaPWA323g6vRaGyGtkynS3gKSD0= 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) 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 1626940253198443.7147603205224; Thu, 22 Jul 2021 00:50:53 -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-21-DEZzsr1dMLG099mkaUT2aw-1; Thu, 22 Jul 2021 03:50:50 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 004D410150A1; Thu, 22 Jul 2021 07:50:45 +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 CF58B60583; Thu, 22 Jul 2021 07:50:44 +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 72F114A7CA; Thu, 22 Jul 2021 07:50:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ogUW009448 for ; Thu, 22 Jul 2021 03:50:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 880175DA2D; Thu, 22 Jul 2021 07:50:42 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id D14E85D9DD; Thu, 22 Jul 2021 07:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940252; 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=XTvtdT//bri/RUOU5ClQQjdGcKsyI3D3rvhh+kMHPsc=; b=RKjofrvmNh9LV8nAbd542xFZcahYI/TCoHyMg1pLgJA400KdTiIluTDkzhCqa/beRKmrDF QOG6zKYFKRUml3ATLtACj+3ulS7Hx30/dRFX84/TunkxiZ8aSbuBUhP3ytn/cGCWsijw2E Ou0vDgY8R1zqhJwsSVmDwqLBEj60ggM= X-MC-Unique: DEZzsr1dMLG099mkaUT2aw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 04/38] virNWFilterCreateVarsFrom: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:49:56 +0200 Message-Id: <20210722075030.25495-5-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940254539100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_gentech_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index da4f71daf1..dbb6b1f80e 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -200,8 +200,6 @@ virNWFilterCreateVarsFrom(GHashTable *vars1, GHashTable *vars2) { GHashTable *res =3D virHashNew(virNWFilterVarValueHashFree); - if (!res) - return NULL; =20 if (virNWFilterHashTablePutAll(vars1, res) < 0) goto error; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940266; cv=none; d=zohomail.com; s=zohoarc; b=hKtj2/M0DTjiWtcQm4xfNzVQeIaBv5nmJKiiZH0Ad6F8O5y7eiNP1//2fN1TBQTRCYvK+kkEZq0kfj2P/lRTfm0IDfjBoaWIp82HvjoMTPIaXYDr+0vq3j/ybL95VHypid8GUNHfWwGqMPbWo0QHlnBc+QUqsZvoOsXbjCZeRCY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940266; 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=aLCPuIDYIVJTzFB0uosAg6gbu/LUeFKsJ3MTXBHxzqc=; b=OS5Fa+VXmpxBlTZ/eFW5FPuGm4Wc65a1NxuqDygEn65bfFT6J89DTWTj2dYwSEuygafeqUxNCA9vblZ4w90mETm/bds536Y2P97qw/YnTpeJYySJJq1p4Kjttv8Pp0Yeubl0N9snw9l7EyS8UzMzvtY+nz2nT+wSadTeCHVbgdo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940266163735.6090421661239; Thu, 22 Jul 2021 00:51: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-143-afw9yQ_VPh2cEku0KMPSiA-1; Thu, 22 Jul 2021 03:50:53 -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 C0375107ACF5; Thu, 22 Jul 2021 07:50:47 +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 9540F18432; Thu, 22 Jul 2021 07:50:47 +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 60ABA4A707; Thu, 22 Jul 2021 07:50:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ohRC009455 for ; Thu, 22 Jul 2021 03:50:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 932325DAA5; Thu, 22 Jul 2021 07:50:43 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA66B5D9DD; Thu, 22 Jul 2021 07:50:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940265; 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=aLCPuIDYIVJTzFB0uosAg6gbu/LUeFKsJ3MTXBHxzqc=; b=KCzdODJ2WtAgc2SunG1y8kBjECcxpsOZUpJ3gIpuE7WKD5foRXxS6mVvPPTi71tvsCL2oo CwVZ15mUdx4hKpj639tdg6JknTNmRAjkhNkP1z+NvRzDCVjqPGFhBJ+UhqNt1MWW16ufL9 iZNWjyYMa/+4S+2Ii6mgLHdpDmRS/rg= X-MC-Unique: afw9yQ_VPh2cEku0KMPSiA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 05/38] virNWFilterCreateVarsFrom: Use automatic memory management Date: Thu, 22 Jul 2021 09:49:57 +0200 Message-Id: <20210722075030.25495-6-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940267482100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_gentech_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index dbb6b1f80e..d17be401e6 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -199,7 +199,7 @@ static GHashTable * virNWFilterCreateVarsFrom(GHashTable *vars1, GHashTable *vars2) { - GHashTable *res =3D virHashNew(virNWFilterVarValueHashFree); + g_autoptr(GHashTable) res =3D virHashNew(virNWFilterVarValueHashFree); =20 if (virNWFilterHashTablePutAll(vars1, res) < 0) goto error; @@ -207,10 +207,9 @@ virNWFilterCreateVarsFrom(GHashTable *vars1, if (virNWFilterHashTablePutAll(vars2, res) < 0) goto error; =20 - return res; + return g_steal_pointer(&res); =20 error: - virHashFree(res); return NULL; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940323; cv=none; d=zohomail.com; s=zohoarc; b=eVfctFhSMsEs8UYmtEuzxWV2j4jMLj5a6EBM03LJ4YVngdOdukzraOodka4vzWis+U8tmi6IOSV30uED4XVtKG6RQXF4TWArFEfp8omva4Ielj1xKfQZVfVSX+XrDSbu44aD5UFmz97d7Wf+E9W622JNLH31hMZ2q4HtN/1DKrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940323; 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=MskO8Z12FumCrkQaEm+MmHCd4BzBjAund/DucRBZ/es=; b=RRxQzL8qO/jPl/ySd1hT/PtXtPXhCfp+g7ZIt9jGFg3CR8M1JAvwjx7RMoRK5pFAkX1dhEd1x+PwsmmGiCMo2XkvNdLqZ/w3eNZUZmLjqugat53xJbeLg51o3jYa0UGSyNfHlrWeI28CBIOYjutjjNaDwBleJHgNbsgDP+Mrc5E= 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) 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 1626940323327321.6803147149591; Thu, 22 Jul 2021 00:52:03 -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-80-d7PFMMzYN3aijFVVJtnyfQ-1; Thu, 22 Jul 2021 03:50:55 -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 1FBEF1084F53; Thu, 22 Jul 2021 07:50:50 +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 EF1BF10016F2; Thu, 22 Jul 2021 07:50:49 +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 BA0A6181A292; Thu, 22 Jul 2021 07:50:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7oi0i009463 for ; Thu, 22 Jul 2021 03:50:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9B7C95DAA5; Thu, 22 Jul 2021 07:50:44 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4AEE5D9DD; Thu, 22 Jul 2021 07:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940322; 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=MskO8Z12FumCrkQaEm+MmHCd4BzBjAund/DucRBZ/es=; b=hNFB5gcHDJY5vtIhS2JEvNuLFkVr6X+An2urghTh+mO+DpSYPoOQmTClge7PbW95q7rnZi WHK9ZvQ/GAyFAICY7NvQtBf7Oei8AsdewbnYsSSpgr5MwE9hzCGgUEFJcBr8udRmVeCACF nCIqEv0vQ//RTdL/sO8uXO4wdCDzfOo= X-MC-Unique: d7PFMMzYN3aijFVVJtnyfQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 06/38] virNWFilterCreateVarsFrom: Remove superfluous `goto`s Date: Thu, 22 Jul 2021 09:49:58 +0200 Message-Id: <20210722075030.25495-7-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940324396100010 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_gentech_driver.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index d17be401e6..a425285e8c 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -202,15 +202,12 @@ virNWFilterCreateVarsFrom(GHashTable *vars1, g_autoptr(GHashTable) res =3D virHashNew(virNWFilterVarValueHashFree); =20 if (virNWFilterHashTablePutAll(vars1, res) < 0) - goto error; + return NULL; =20 if (virNWFilterHashTablePutAll(vars2, res) < 0) - goto error; + return NULL; =20 return g_steal_pointer(&res); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940263; cv=none; d=zohomail.com; s=zohoarc; b=SqXQrLCZ4FkIwirezHFpN27YxfdmDgsChrFkljE5/xfR+CFIL2p4vhphT9dyuWyqlu4i+aEz4zqQ8mkyzigwgq/+KGhWvk/4Q3osM1V00bSIJtzo44c3HUlxMwH55kAofq7jgl+4wq8caPPi48hStWNXB/cVP9I6nKjV5jUUGWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940263; 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=A3aZ6vXeIm9qj9xwBk0+FGaxlQEzVOq+PIvK3/iHOqA=; b=LpyIIQSYAFoxswDc0N0/bMAL+3nk3qg6PI29K8Oj+1cnbytE1tsYvWiBmUYnRZQuG4H9Zi4kOcV8duCMTnFNwg4Qb8qO2NxWjY8BU/mEn9pQbbfUqGrYp5Tjmp2Me1lWwE7GGVV3/7l7vCJAPEi7ajHqFi8Vx7bA56SQkfSb0F4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940263235577.4251709599035; Thu, 22 Jul 2021 00:51:03 -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-506-0d5GIZovNjmM4rIUcY4_2Q-1; Thu, 22 Jul 2021 03:50:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B706F10150A9; Thu, 22 Jul 2021 07:50:50 +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 9BDD75B826; Thu, 22 Jul 2021 07:50:50 +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 6A269181A29E; Thu, 22 Jul 2021 07:50:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ojDk009476 for ; Thu, 22 Jul 2021 03:50:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3CDD5DA2D; Thu, 22 Jul 2021 07:50:45 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE5B55D9DD; Thu, 22 Jul 2021 07:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940262; 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=A3aZ6vXeIm9qj9xwBk0+FGaxlQEzVOq+PIvK3/iHOqA=; b=gLvAuq1GAYaRwDE1zDz2QpcouoOhXayE9DlcNVX7jQtiNbmdzjxXj1vyiKzWrrwf4z8zCE Bs6sv9DL0zDzTCi4wd9fq2XO1H2RR+n1EFVNilFw5yTq8GfqvY0KDmGOwonAPZoBa1iGyS E+MErg3qEURasWvhRE4Fbqk5/imBIhA= X-MC-Unique: 0d5GIZovNjmM4rIUcY4_2Q-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/38] virNWFilterRuleDefToRuleInst: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:49:59 +0200 Message-Id: <20210722075030.25495-8-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940265293100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_gentech_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index a425285e8c..f98af5d513 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -261,8 +261,8 @@ virNWFilterRuleDefToRuleInst(virNWFilterDef *def, ruleinst->chainPriority =3D def->chainPriority; ruleinst->def =3D rule; ruleinst->priority =3D rule->priority; - if (!(ruleinst->vars =3D virHashNew(virNWFilterVarValueHashFree))) - goto cleanup; + ruleinst->vars =3D virHashNew(virNWFilterVarValueHashFree); + if (virNWFilterHashTablePutAll(vars, ruleinst->vars) < 0) goto cleanup; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940259; cv=none; d=zohomail.com; s=zohoarc; b=Uh8+biQfpBpfVkNn7vYDa3Zz8NJr3p6uYqXIvpgN67RsJMZKqET23aiBmvq3AV43KybvgR84ayDNcg5rMMBa6yqblcffnNxuyykrXEfmh32KUe75m1yCojIGbIcQli9cgQ8LMseqSYW24KYkVTBM5jw9IyhdOZ1wjEe0q4xby+w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940259; 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=4P0mw9lS0aZSDctqAJUU0JtWIzD39rxa4dkwzzvmy3g=; b=WbAc2jP8nbylvKLKLN6UXm2fqQyD7vc/8PO7pMlRrfGc93m+/Upq1kxkC2lYqM6C9+63syGLLk9RUjN51V6t6qdGTVuyaGQ4uMBPrtsW+FQenYQxf5RS4OQZSf/P7yEHcR+7CfXet326PErEMamiOh5C4nOrHTo9jl2/hj6h5b4= 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) 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 1626940259900367.0609127895093; Thu, 22 Jul 2021 00:50:59 -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-579-DoHddZ7_M1-WVM_u8LiQFA-1; Thu, 22 Jul 2021 03:50:57 -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 1865310150A6; Thu, 22 Jul 2021 07:50:50 +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 DF37418432; Thu, 22 Jul 2021 07:50:49 +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 A958B4A70A; Thu, 22 Jul 2021 07:50:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7okjk009485 for ; Thu, 22 Jul 2021 03:50:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id ADB345DD68; Thu, 22 Jul 2021 07:50:46 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 032FD5DAA5; Thu, 22 Jul 2021 07:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940258; 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=4P0mw9lS0aZSDctqAJUU0JtWIzD39rxa4dkwzzvmy3g=; b=hM2DpNY5hqR/ZhivhQ3toEV3kuE3Rg6MYqKPZXMWy3/63pNrOP1yU33+dsQlP6Co0BzwDr J4h7Gjg/oxTi4Knuv7qpBq0llOXe/PXgcNBUcJ7UtYHaUEPiVLttl7H3CjIXfwbikrRfeD F4AlF+Xjtw6FUPTkdBHomvHCOHOW3N8= X-MC-Unique: DoHddZ7_M1-WVM_u8LiQFA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/38] ebiptablesApplyNewRules: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:00 +0200 Message-Id: <20210722075030.25495-9-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940261098100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_ebiptables_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfil= ter_ebiptables_driver.c index 345562bab6..ec17d43c4e 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -3338,9 +3338,6 @@ ebiptablesApplyNewRules(const char *ifname, size_t nsubchains =3D 0; int ret =3D -1; =20 - if (!chains_in_set || !chains_out_set) - goto cleanup; - if (nrules) qsort(rules, nrules, sizeof(rules[0]), virNWFilterRuleInstSortPtr); --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940269; cv=none; d=zohomail.com; s=zohoarc; b=Q5wav9eh8wbJ+97WMNNMMyYO7dq+UAp2Zdt4o2H4+Oz1RqAIf73RZkrcetwLPIjVcsw7D4wU+mMPYbjAMwH5COzGHtD9lP6IuAhF3YkFR6A47BeuhSPBjlOn1j6qZLbs+ROCSGF5vYRFbw/mvZmcy7CEEtES3cCw28CWRPTMS9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940269; 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=WSoTvTo//n2j/pDjhI9aszfLcoJnOxE2+GbV/hFyHeU=; b=kS/Owrj7wfqq+o3ghXPE9aHeH++wlC3ys1wz76UzW50xGhtaZCcmPkOObFwUWwq6N5zey8vix9hosi9iN5ddR1CXHxHLcaBr2jJzpQcvOlovzqKMZZoZur6WnFkKm/gT0IGMbj3H/Tr6aITLMo8+lgbu3VQUz4B0iFRoWWhTw3c= 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) 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 1626940269142100.04992789969083; Thu, 22 Jul 2021 00:51:09 -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-595-0g5l3vyuOGON3O1Z3hiflA-1; Thu, 22 Jul 2021 03:50:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BB0F91934101; Thu, 22 Jul 2021 07:50:52 +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 9E5DB421F; Thu, 22 Jul 2021 07:50:52 +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 6D654181A2A2; Thu, 22 Jul 2021 07:50:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7olte009495 for ; Thu, 22 Jul 2021 03:50:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id B9CF65DAA5; Thu, 22 Jul 2021 07:50:47 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CCBA5DD68; Thu, 22 Jul 2021 07:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940268; 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=WSoTvTo//n2j/pDjhI9aszfLcoJnOxE2+GbV/hFyHeU=; b=a2ifF4q7xZKZiVZ+Y1rawHBInEYKhisBOzZKThDhuFE6QNLozS9AnBawEGs/GSlcsXWR6u URo7LfEqpCCeb1Qd17TLyAikoVjLXR1JhbTMoCA/RdqY/jXWMfMEBFEDYlH/0D9MB8x5Os u9+VcKQ8E7TmmuBFPlXtlqTDrmPOoN0= X-MC-Unique: 0g5l3vyuOGON3O1Z3hiflA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 09/38] hypervCreateEmbeddedParam: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:01 +0200 Message-Id: <20210722075030.25495-10-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940269802100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/hyperv/hyperv_wmi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index b113283aeb..dc2c6471ab 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -275,7 +275,7 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo) { size_t i; size_t count; - g_autoptr(GHashTable) table =3D NULL; + g_autoptr(GHashTable) table =3D virHashNew(NULL); XmlSerializerInfo *typeinfo =3D NULL; =20 typeinfo =3D classInfo->serializerInfo; @@ -284,10 +284,6 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInf= o) for (count =3D 0; typeinfo[count].name !=3D NULL; count++) ; =20 - table =3D virHashNew(NULL); - if (table =3D=3D NULL) - return NULL; - for (i =3D 0; typeinfo[i].name !=3D NULL; i++) { XmlSerializerInfo *item =3D &typeinfo[i]; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940260; cv=none; d=zohomail.com; s=zohoarc; b=OI9sxniMR9iueBVKaCorvnZMII6EeKLz6olUA+k4ZDdne79QFJdVhWSZ7xwCHTkklvlbxaq2K/3bvgK4Ygy6p/HOal/o1WfG4v+NUUnfNveLEZ9eTMP3WoKhT5FK+mM7BNhlx1AqspJrvFfoCpcFy/gAiQZ48D72eyuKDonLs34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940260; 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=HR/mOXsAkJyATdexQiRGWQWRJAcpZRVeOLP3VhiahDs=; b=GWssKp8w4f8ybWMgOKr50uxrAwJPFI/EaI88PAgbLUSAh9ojYHrH6R8yv01+BR1/t39MVS8VIkvpg38qNvwscbzTS9dIsXAxNMlGdyLqHLIQdR0ZVrsDJObClVy8zBM9R2DLVC30SApfma4AhcjRVe9J69lQw/r3WhjB7z5w6eI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940260468908.1917386928594; Thu, 22 Jul 2021 00:51:00 -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-250-6PzlVUspPGWQ1N8xMZlAiw-1; Thu, 22 Jul 2021 03:50:57 -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 9EC02804142; Thu, 22 Jul 2021 07:50:52 +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 728F0104C51A; Thu, 22 Jul 2021 07:50:52 +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 3B5894A70D; Thu, 22 Jul 2021 07:50:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7omMQ009506 for ; Thu, 22 Jul 2021 03:50:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id C3F635DD68; Thu, 22 Jul 2021 07:50:48 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18B165DA2D; Thu, 22 Jul 2021 07:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940259; 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=HR/mOXsAkJyATdexQiRGWQWRJAcpZRVeOLP3VhiahDs=; b=QSX0Xy4hqZ9SbYkhRbubDxY3cwuAI2Y7uaVgu8vVit0OLfAgKL1EHgCfFc+/JincTH52T+ QhKqAf/7aB5+deLOyLkVIQac7DRKOzIIjrPQofrLk1Pvc/TZJAXrNZUU38WxJ7siWfUqJy FFLqS/ArtsAR+Mrs4I9lKMXdbJkH+4w= X-MC-Unique: 6PzlVUspPGWQ1N8xMZlAiw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 10/38] qemusecuritymock: init_hash: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:02 +0200 Message-Id: <20210722075030.25495-11-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940261117100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/qemusecuritymock.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/tests/qemusecuritymock.c b/tests/qemusecuritymock.c index 5daf27ccd7..87aadf564e 100644 --- a/tests/qemusecuritymock.c +++ b/tests/qemusecuritymock.c @@ -100,20 +100,9 @@ init_hash(void) if (xattr_paths) return; =20 - if (!(xattr_paths =3D virHashNew(g_free))) { - fprintf(stderr, "Unable to create hash table for XATTR paths\n"); - abort(); - } - - if (!(chown_paths =3D virHashNew(g_free))) { - fprintf(stderr, "Unable to create hash table for chowned paths\n"); - abort(); - } - - if (!(selinux_paths =3D virHashNew(g_free))) { - fprintf(stderr, "Unable to create hash table for selinux labels\n"= ); - abort(); - } + xattr_paths =3D virHashNew(g_free); + chown_paths =3D virHashNew(g_free); + selinux_paths =3D virHashNew(g_free); } =20 =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940448; cv=none; d=zohomail.com; s=zohoarc; b=KksuCH/cly6ErAZbYba/dJjEeCCAv0zM2/j3nK8r8cDvnn6F+lFj9J4KnqcN9NhBkEOoxwLlD/mZY0P7xkzBRL8M77nynepa2wIENYAyaY2k2yCoevlyqcbSL7JtdQ6tPPcHhxK67XxII6nbyKHTWTwASB+JXBZ+yvBTKAqoYBM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940448; 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=xYaRpTON+q8cVqE55Va9X4UNzhU09mwvmLL5VFWMzR4=; b=dvbNUxDTKom3VrX6sapymgXdsvt9hYldG3tJUCz+Uv1zCNiFJOMbDfGXMWk9wezK5gYRYlXVrxtrZwJChUMdxY9Gcj6n1Y86FhO7G+hYn+EcXTgU4uhRQvHE9MZIYToAPSR//kf+cUN9BZlmOb7j5vElZ2HXNjRDnK0iZ+9DVHY= 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) 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 1626940448876212.78071749521678; Thu, 22 Jul 2021 00:54: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-317-_oFNUK_yOx-qrQh4zJoLJw-1; Thu, 22 Jul 2021 03:51:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A55F0193410E; Thu, 22 Jul 2021 07:50:55 +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 8ACBC19CBA; Thu, 22 Jul 2021 07:50:55 +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 58943181A2A8; Thu, 22 Jul 2021 07:50:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7onlA009515 for ; Thu, 22 Jul 2021 03:50:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB8DC5DAA5; Thu, 22 Jul 2021 07:50:49 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21E225DA2D; Thu, 22 Jul 2021 07:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940447; 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=xYaRpTON+q8cVqE55Va9X4UNzhU09mwvmLL5VFWMzR4=; b=SMcF5LinPtEuQU3rh3ihNtu4oOA2+pQitEsVu7OUQZhg+85MBTCzVcG6k730Bxrky4cXWg Mfr16Rdz6phVHXK86FUxBTgiBDx16QkA8LpnzZhBjj/6Tf/alByB6dVlz/i912OPqesRF1 3BeogjZPHp9kudR03PUz/m6vCOn/Tgs= X-MC-Unique: _oFNUK_yOx-qrQh4zJoLJw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 11/38] libxlLoggerNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:03 +0200 Message-Id: <20210722075030.25495-12-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940450880100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/libxl/libxl_logger.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_logger.c b/src/libxl/libxl_logger.c index 0807383d39..f7b5c8ee16 100644 --- a/src/libxl/libxl_logger.c +++ b/src/libxl/libxl_logger.c @@ -149,9 +149,7 @@ libxlLoggerNew(const char *logDir, virLogPriority minLe= vel) break; } logger.logDir =3D logDir; - - if ((logger.files =3D virHashNew(libxlLoggerFileFree)) =3D=3D NULL) - return NULL; + logger.files =3D virHashNew(libxlLoggerFileFree); =20 path =3D g_strdup_printf("%s/libxl-driver.log", logDir); =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940389; cv=none; d=zohomail.com; s=zohoarc; b=g6wbfUnNP+3sQRlfGtQWT3KbQHP0rygZ16/QtZmQCs/Fhzq0ItYKerhgT7n4U4yAkSmR1fRbEHExRARUCliv2ZVS5NyDV3EMHT3fK1v3yPhGmTFjYUaqI6dKx7LNFK08rDaTxsLtqXOFBjE4iqx8DsKoKzNTCoifCwps6YNAS28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940389; 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=ut25DRxHcdMTr8rz0VzFIKoXyk1Otc2sGRvxIFXzQBo=; b=TBVT2ElmJhR4mVBTdICVoBieIGXuPN08OXE/LenYair/BBZhD1f1q7xVntUpnwje7RQBAFJbtZnMiFK7N6fR0/AlkhsGHLK+9NVPivGeDXPl7LlEsUjC31R3/ro1CvJC/yAREWLw9ffSn9dXySfvViMeeu3bfC5GRozlkC1f6cc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940389084654.8381164086791; Thu, 22 Jul 2021 00:53:09 -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-206-CYG9C4N-NT-Jtz2vnP1Zdw-1; Thu, 22 Jul 2021 03:50:58 -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 7DB3910150AB; Thu, 22 Jul 2021 07:50:53 +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 5C7475DA2D; Thu, 22 Jul 2021 07:50:53 +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 2ABEA181A2A5; Thu, 22 Jul 2021 07:50:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7oo0V009534 for ; Thu, 22 Jul 2021 03:50:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id D603F5DAA5; Thu, 22 Jul 2021 07:50:50 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B33D5DD86; Thu, 22 Jul 2021 07:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940388; 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=ut25DRxHcdMTr8rz0VzFIKoXyk1Otc2sGRvxIFXzQBo=; b=B/bJ7tQ/tHKH4aIld4bH4+oZ1iRqoZKoJeywA0LuheceVYr/nL0Ah4zN2Piya/U2V4sVuY ovYB+B4HimCn742mjFgED7awpRx1DAPuLeom8Rw914ChaS7yuwi0Lt0si+CKCxrGXswwpA gWOqKi7rWlDBf14y4DmepocN2Q7hyiU= X-MC-Unique: CYG9C4N-NT-Jtz2vnP1Zdw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 12/38] qemuBlockNodeNamesDetect: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:04 +0200 Message-Id: <20210722075030.25495-13-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940390875100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_block.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 6627d044cd..2815eb54fa 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -365,10 +365,7 @@ qemuBlockNodeNamesDetect(virQEMUDriver *driver, GHashTable * qemuBlockGetNodeData(virJSONValue *data) { - g_autoptr(GHashTable) nodedata =3D NULL; - - if (!(nodedata =3D virHashNew(virJSONValueHashFree))) - return NULL; + g_autoptr(GHashTable) nodedata =3D virHashNew(virJSONValueHashFree); =20 if (virJSONValueArrayForeachSteal(data, qemuBlockNamedNodesArrayToHash, node= data) < 0) --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940266; cv=none; d=zohomail.com; s=zohoarc; b=Pgx7ICoY2KND4NkwIKoTzxUtWnSv/G4yqfkvoMxEXr9QpygBH32kYRvvM7y0YWXZ5m8mitH1JNm7MHxd5F/u8jbJ8vDR2rGcKUYnKOcQ0sNf8oouMu8ecsPY/EY3TmyxNI5jP4moVoIz+HstuXHh4pEe6Kn7uKDzBCyxIDOCyC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940266; 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=Zk5lCiBS+1XiDTPuAJKzmYUlaKkwROxmqvGPhdCeHxU=; b=i3wSOGoQXi3zcXOjCutnSqWzUrPmuGHlmxPyhUojWCb+gMbn8KdylX0Q75yxu90sHbOHlov9Su1OIa+cjif7L+W2WdIixW8SqcWdEBH/8BgFZnCOm46MOAUfuwjFLMcKIiBH9zi980uo4IaCuvm/RjmbpgUU+jQNtw96BdLkSZg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940266898394.5769919359818; Thu, 22 Jul 2021 00:51: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-492-7NuXqz_VO3WrpjLLu6zZAw-1; Thu, 22 Jul 2021 03:51:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B74661084F60; Thu, 22 Jul 2021 07:50:58 +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 9AAD319CBA; Thu, 22 Jul 2021 07:50:58 +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 5F5B04A710; Thu, 22 Jul 2021 07:50:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ot7j009552 for ; Thu, 22 Jul 2021 03:50:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 927505DAA5; Thu, 22 Jul 2021 07:50:55 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBE665DA2D; Thu, 22 Jul 2021 07:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940265; 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=Zk5lCiBS+1XiDTPuAJKzmYUlaKkwROxmqvGPhdCeHxU=; b=Weea9WxKfr52oLspZTgc1q5v1HDcOke5kc0RFbVe02wjqFFcQcSkJHVrWjjj5qqr7n/iME LZNbx1G5idkOVlcnWCyF9pW+d6IAawenRNhDO8y+Cb2MJTTuYro9Gtw8oUBhX70aDgVI2o MV8lRABUuo9ozHElNQD9xpoOHbI37lw= X-MC-Unique: 7NuXqz_VO3WrpjLLu6zZAw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 13/38] qemuBlockNodeNameGetBackingChain: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:05 +0200 Message-Id: <20210722075030.25495-14-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940267519100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_block.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 2815eb54fa..8150241015 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -231,22 +231,16 @@ qemuBlockNodeNameGetBackingChain(virJSONValue *namedn= odes, virJSONValue *blockstats) { struct qemuBlockNodeNameGetBackingChainData data; - g_autoptr(GHashTable) namednodestable =3D NULL; - g_autoptr(GHashTable) disks =3D NULL; + g_autoptr(GHashTable) namednodestable =3D virHashNew(virJSONValueHashF= ree); + g_autoptr(GHashTable) disks =3D virHashNew(qemuBlockNodeNameBackingCha= inDataHashEntryFree); =20 memset(&data, 0, sizeof(data)); =20 - if (!(namednodestable =3D virHashNew(virJSONValueHashFree))) - return NULL; - if (virJSONValueArrayForeachSteal(namednodes, qemuBlockNamedNodesArrayToHash, namednodestable) < 0) return NULL; =20 - if (!(disks =3D virHashNew(qemuBlockNodeNameBackingChainDataHashEntryF= ree))) - return NULL; - data.nodenamestable =3D namednodestable; data.disks =3D disks; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940270; cv=none; d=zohomail.com; s=zohoarc; b=j8vVkWKCyOMy83owwOJBwthA7Rrq9rd2vrYvyQsMM0Evy7nFmq7YnabwaR97YP8GOl13HkiUaeEyOF82qcWSgNPHSGt7PQ7K0l//YRnUdKYDIWHbfkbsN4D4vj2eTJGm4M4HdbdHwdcefEq96kBt+nF8ryoMNg6PzPYdtQb0CFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940270; 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=FgsLBxDzGWr0bRyz0gqzZtUwK4/6HGViEfgclQpU+8k=; b=kYRbHnjl4ZJx8H1IGsHptEst1Csxj9l9igz/2/xfx/ecR9oI27tWOGXCzgZjzsMG0cBi6fPIGqLZlCJutoOYczg513edfmY+C+RsNwDHsXPtx/ladPxcLDis/HOwCF2ycbjgaehJl7MR+puLYczoGiFKX10iLx5P3VCifNzaWAI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 162694027091562.0433690707963; Thu, 22 Jul 2021 00:51:10 -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-336-L0_8tSrdNa-J1ZEq3fg3cA-1; Thu, 22 Jul 2021 03:51:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29FD7760C9; Thu, 22 Jul 2021 07:51:02 +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 0B55619CBA; Thu, 22 Jul 2021 07:51:02 +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 C8712181A2AA; Thu, 22 Jul 2021 07:51:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ouFK009560 for ; Thu, 22 Jul 2021 03:50:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9BF845DAA5; Thu, 22 Jul 2021 07:50:56 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E60D617CF0; Thu, 22 Jul 2021 07:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940269; 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=FgsLBxDzGWr0bRyz0gqzZtUwK4/6HGViEfgclQpU+8k=; b=BUnSgqH5+UjaUyFzA0oz9uZ8bmlGlTy58DVV6AwuKsWgCf62Yd011cqp8mElDpWhimi9CW kRfH0GcrrDkY4OCDmw6VgdQH0FaLH4AwbUmrHJ9zqdrUFuuVZXmoW6Q67FX5ohkgS28V6i dkpWJ5N+yul1Gr6tTImjbvfehfkC1Iw= X-MC-Unique: L0_8tSrdNa-J1ZEq3fg3cA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 14/38] qemuDomainObjPrivateAlloc: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:06 +0200 Message-Id: <20210722075030.25495-15-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940272001100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ac1d8ef151..b919da6eab 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1788,8 +1788,7 @@ qemuDomainObjPrivateAlloc(void *opaque) if (!(priv->devs =3D virChrdevAlloc())) goto error; =20 - if (!(priv->blockjobs =3D virHashNew(virObjectFreeHashData))) - goto error; + priv->blockjobs =3D virHashNew(virObjectFreeHashData); =20 /* agent commands block by default, user can choose different behavior= */ priv->agentTimeout =3D VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940268; cv=none; d=zohomail.com; s=zohoarc; b=BJ+ee2NeY5LUJNRfW74yxLi5+8WA1eVSQuqMjcFlVTH+FklcxT/dfUvohs8wz2ZtgMajSV5ZnORlhwoAD89diO/XO5bj7TO8hzjSF2GiAquFQT7eJmtVFoAdOeUL8guKFBx3xIoRmEeeqhIBjqOJUzMSthQsyEmQPrnfNy9LuoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940268; 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=XrvHqW/u6Y24wFBSD4UdcfSb0J6cI4/FkMUqQyBI7jc=; b=IqMth68sIWKx6lktiQx8P1AzdsNb2EL67m4NEkvTr55NCjIW0jTyfvyXG7F0KRcdCGKhir+xQd9SCxCrAcSkdL1uQXSjZpkNaByWiunagO+pbI3/bV3QJQrvy0O4SHgTpy6WatYy1BcLvRANrt+qMOhwyvWl6chgTmH7fHwnjY4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940267907417.43825870966646; Thu, 22 Jul 2021 00:51:07 -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-466-FvXW2XLrO7uF4quAAZg2DA-1; Thu, 22 Jul 2021 03:51:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E7AB10150A6; Thu, 22 Jul 2021 07:51:00 +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 3D52F5C1BB; Thu, 22 Jul 2021 07:51:00 +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 087134A711; Thu, 22 Jul 2021 07:51:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7ovlY009567 for ; Thu, 22 Jul 2021 03:50:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id A42F35DAA5; Thu, 22 Jul 2021 07:50:57 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE17A5DA2D; Thu, 22 Jul 2021 07:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940267; 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=XrvHqW/u6Y24wFBSD4UdcfSb0J6cI4/FkMUqQyBI7jc=; b=bMAvR7ELpzVu01gyx3tuwGW4duxlEO5Oolabu0XzCcx86NcIlQGEsA0iOdY8F1uPuqpD3R iGx3hX5ll4ssMitvQ70GrkOl2G43xyDQMWgeu/yxpFjSSF//gTDFn9Dstllk+FLEuV9tXn WBTUY9S1hHW1PiJYGojAvq64Ibhucu8= X-MC-Unique: FvXW2XLrO7uF4quAAZg2DA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 15/38] qemuInteropFetchConfigs: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:07 +0200 Message-Id: <20210722075030.25495-16-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940269798100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_interop_config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index ea2afcc070..848e8f7381 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -88,7 +88,7 @@ qemuInteropFetchConfigs(const char *name, char ***configs, bool privileged) { - g_autoptr(GHashTable) files =3D NULL; + g_autoptr(GHashTable) files =3D virHashNew(g_free); g_autofree char *homeConfig =3D NULL; g_autofree char *xdgConfig =3D NULL; g_autofree char *sysLocation =3D virFileBuildPath(QEMU_SYSTEM_LOCATION= , name, NULL); @@ -117,9 +117,6 @@ qemuInteropFetchConfigs(const char *name, homeConfig =3D g_strdup_printf("%s/qemu/%s", xdgConfig, name); } =20 - if (!(files =3D virHashNew(g_free))) - return -1; - if (qemuBuildFileList(files, sysLocation) < 0) return -1; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940272; cv=none; d=zohomail.com; s=zohoarc; b=Rs8V+TtG1xn/6Ecc9bXhOhrp1tr5roWEnbV8GIIImODljW83NGQ8DMMGfvyr9QI4jxxy3KLt/WXH8f4DrRNkjPlKIJKNyTVc7aZJb38DEs/l//dD+qLALQvczoT82KGhPiSf7BvuKPL0PwSQdOqOmQPtKEycKeNNFHBpMZpG54A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940272; 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=Bz1cwqJfu3fnQ5rARnGRvrvZcyQ6nIqx/Zz/i2Azdfo=; b=Uk/x5/YaxMU7fmZXPXnnA+ea6JlBktCsOvO/NXLF9XdpY2hu/roSBg4D8EVvFOkjGky0NX2m6R8bb16dJLmeJhAnCjUdvep17otuM6f743LhroQKV3R8sekA3wK20CRMZytSCdYJkhABM0Le8UkKVsszlaR+R/gK7He/wRPmvRE= 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) 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 162694027213386.19487650963913; Thu, 22 Jul 2021 00:51: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-503-h2gEKrASOKyXXh0d276p0Q-1; Thu, 22 Jul 2021 03:51:09 -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 5F02E804148; Thu, 22 Jul 2021 07:51:03 +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 3C6A25DAA5; Thu, 22 Jul 2021 07:51: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 06C92181A2E4; Thu, 22 Jul 2021 07:51:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7p1gp009587 for ; Thu, 22 Jul 2021 03:51:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 98AE65DAA5; Thu, 22 Jul 2021 07:51:01 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2C8F5DA2D; Thu, 22 Jul 2021 07:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940271; 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=Bz1cwqJfu3fnQ5rARnGRvrvZcyQ6nIqx/Zz/i2Azdfo=; b=HqtClIuPCxnn6xS+OHCZ5QrsbCZXcI46QA/agelPy8kNOz1UzxJoPpvAfJsgHHiSbERO4K 4dmBq0QzWKtThMhBEbrRUv6jWfw7ox4c1LIG8oJyOCf3sWKmXJBPZhEc8CkDLLmS4DzebU S5uENSV36kat6w3g8akiJe2st4bpMUk= X-MC-Unique: h2gEKrASOKyXXh0d276p0Q-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 16/38] virChrdevAlloc: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:08 +0200 Message-Id: <20210722075030.25495-17-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940274110100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virchrdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 91f2b5a233..5d6de68427 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -265,13 +265,9 @@ virChrdevs *virChrdevAlloc(void) =20 /* there will hardly be any devices most of the time, the hash * does not have to be huge */ - if (!(devs->hash =3D virHashNew(virChrdevHashEntryFree))) - goto error; + devs->hash =3D virHashNew(virChrdevHashEntryFree); =20 return devs; - error: - virChrdevFree(devs); - return NULL; } =20 /** --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940276; cv=none; d=zohomail.com; s=zohoarc; b=IT2zFLcelOTW/5k1UJf+iD+F+g5W6HzujXgvq55ipVJy/WIEsvoK0wOVrY4EF1F9GiyPt/Rgd6hBB0sV1UkoYGWyNqkG+F6keR2tvjo51OoKE7lScfq0WDkfpqEwzjYqH9DMXVHjV/x+HPGzJtAWQIYL0tGYnT6H7dmmbgRNuEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940276; 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=oiks+o9eToBfiHemwhSZI8hpfwj8hoffVfLvPSKIsvk=; b=JNell4BeZ6wc2jtBdLKWD4CDHD2XeSV4m7FG1qPsDoTI3lyHbLTrSrWfVoHjmVyAQDOAicOkCapL+s4jpmPYRt0CmsbnLPBJ8kMdsYS35SaOwqp9/8DPl3LFkYGgo8lZdPshnNP6sFa2GKXQkoUP6JZ1BohjL/PtiNk9whxd1cU= 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) 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 1626940276015922.4948058750757; Thu, 22 Jul 2021 00:51:16 -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-479-Wp-VFkRsP3S1ijGNHrznZA-1; Thu, 22 Jul 2021 03:51:13 -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 086EF8015D0; Thu, 22 Jul 2021 07:51:08 +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 DC49D60CA1; Thu, 22 Jul 2021 07:51: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 A7A574A714; Thu, 22 Jul 2021 07:51:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7p6Bb009744 for ; Thu, 22 Jul 2021 03:51:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5C6755DD68; Thu, 22 Jul 2021 07:51:06 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id EAF755DA2D; Thu, 22 Jul 2021 07:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940275; 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=oiks+o9eToBfiHemwhSZI8hpfwj8hoffVfLvPSKIsvk=; b=axVoO5v/vRhf9p7o8BU7pMRaFjAZp0RZu+MmXCY+ueOpq1DpzUnnlNd5YuLGg1RSEpMzp0 JeWfphhAedVN4ER9+gMNuXE9kRwjw8DNM+awADy+U91mDLnXu8zYzCOnmYQUFs/jWtvVD/ sDb+59URv9RVYCSElxdsMhTEEFNiaHI= X-MC-Unique: Wp-VFkRsP3S1ijGNHrznZA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 17/38] virCloseCallbacksNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:09 +0200 Message-Id: <20210722075030.25495-18-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940276430100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/hypervisor/virclosecallbacks.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/hypervisor/virclosecallbacks.c b/src/hypervisor/vircloseca= llbacks.c index b9d4940b60..2578a71f03 100644 --- a/src/hypervisor/virclosecallbacks.c +++ b/src/hypervisor/virclosecallbacks.c @@ -69,10 +69,6 @@ virCloseCallbacksNew(void) return NULL; =20 closeCallbacks->list =3D virHashNew(g_free); - if (!closeCallbacks->list) { - virObjectUnref(closeCallbacks); - return NULL; - } =20 return closeCallbacks; } --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940278; cv=none; d=zohomail.com; s=zohoarc; b=fyn1zTwl8rveHaQU+3SvYRzRoLwxRJ5M/xRXK3NyF4523fWhZzQsTLd11YSioYg88Cur6oiQz+2h3Gas6b/mmYUipOqQBwX+PtnQ6NzqVvD7P8wEvXasdtz3s4cTFLhacYR/n5m/gE1xyRfrUqGOvURdaxTzNXBnu8wVYrHO/CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940278; 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=2bR3H3KWkhLkqHbqReSxKN10lz7F39PvIIG4eRAY/s4=; b=HnB/AgKLHYD1BkpHKNqB0nosJXUYwaL9Mh+xzQQjMx5i8qwSABaPRQVz1GnJEhcyMT5MbMeo7ffeo8Po8g5fNPZpjx/hUh2HnnO4eLODIimRzVo00eTcri1Cy2iigPSrKIYh7nuBFQdo0P9CQx4A3k9aPp6sXFRGj+Il17gCdTQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 162694027875797.0053393183664; Thu, 22 Jul 2021 00:51:18 -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-540-vGQ9aR_BNXycKBx6qJ-q9w-1; Thu, 22 Jul 2021 03:51:16 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 448031934101; Thu, 22 Jul 2021 07:51:11 +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 1D2D319D7C; Thu, 22 Jul 2021 07:51:11 +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 DC06D181A292; Thu, 22 Jul 2021 07:51:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7p7Qw009767 for ; Thu, 22 Jul 2021 03:51:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6507F12C82; Thu, 22 Jul 2021 07:51:07 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF46C5DD68; Thu, 22 Jul 2021 07:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940277; 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=2bR3H3KWkhLkqHbqReSxKN10lz7F39PvIIG4eRAY/s4=; b=eSb8V94kzq1JDFERNIuJCuecjcvcg8AjNfmKUE//rRhekxB+U58G5CYMp8fZFcn1r7ATj0 UOQXxjf6pMn8F8Muf/6RTiU5EFBUGFGxBEFBQMcqy5MbK1YRN1+12DyQK+pL9vk50/gAS0 3YZ5h2m1wI96gse73mP8X+wtnLxxLCs= X-MC-Unique: vGQ9aR_BNXycKBx6qJ-q9w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 18/38] virDomainCCWAddressSetCreate: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:10 +0200 Message-Id: <20210722075030.25495-19-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940280696100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_addr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index f011721beb..53b39923e8 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1388,8 +1388,7 @@ virDomainCCWAddressSetCreate(void) =20 addrs =3D g_new0(virDomainCCWAddressSet, 1); =20 - if (!(addrs->defined =3D virHashNew(g_free))) - goto error; + addrs->defined =3D virHashNew(g_free); =20 /* must use cssid =3D 0xfe (254) for virtio-ccw devices */ addrs->next.cssid =3D 254; @@ -1397,10 +1396,6 @@ virDomainCCWAddressSetCreate(void) addrs->next.devno =3D 0; addrs->next.assigned =3D 0; return addrs; - - error: - virDomainCCWAddressSetFree(addrs); - return NULL; } =20 =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940281; cv=none; d=zohomail.com; s=zohoarc; b=KGiRWq+RTTf4DXF62GKkJGmm9l9OGnth+S5HliLfLbikAtnqvVxmFwmM4Q2HqBKkICnECblmLztWgpYzni8CSXurzOguIoVTVj//rBWqrbdiYJXZjEVuJCKqoRz8ix+SXv2UKIFMw+jUV9wR5rugZo8BuB7xzRg6GcYnVvSXJ6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940281; 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=0RR/tQBWEbHD29G6alveGPFVRftbYK2Ukgvsimz9jfM=; b=M6W6ZAywDvzYsPv9/HjtF691pJF2Omo0t9vuFgWcE8TIVqfRbxyI2M7ncRM3lqN3gTWI+TpCQaCPn6H8VQfTaaC5msHikOFIpphccnFxMfWcHC5n5DV5QrpgggY/mqHd2lzmL0uegV88azTK2V39Q+1U7rgYFyIIzd6xW2dLoUw= 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) 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 162694028168295.04292048592401; Thu, 22 Jul 2021 00:51:21 -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-259-ArGjO69jOIGpws4-jD-eRQ-1; Thu, 22 Jul 2021 03:51:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D1F5D1084F4C; Thu, 22 Jul 2021 07:51: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 B55422C016; Thu, 22 Jul 2021 07:51: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 8082C4A718; Thu, 22 Jul 2021 07:51:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7p8vR009815 for ; Thu, 22 Jul 2021 03:51:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6F5405DD86; Thu, 22 Jul 2021 07:51:08 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id B74025DD68; Thu, 22 Jul 2021 07:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940280; 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=0RR/tQBWEbHD29G6alveGPFVRftbYK2Ukgvsimz9jfM=; b=WlKIBAdkscSlluHYdMCu4t49Xno/gAfAl7ytP2eeNLK1z/c1nKkI91IcmzajTbQ+AWiiK8 TwG95HeEMl3+dpQZ4mBIQEZ5XHnmE+CIfMzrTLyNkCOUwgrEy2r8PZVO5DIE3Bcs6eMkVh Dy/zLDwLIOaW8z7vnRG1QcyADqnAX1s= X-MC-Unique: ArGjO69jOIGpws4-jD-eRQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 19/38] virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:11 +0200 Message-Id: <20210722075030.25495-20-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940282919100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_conf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e05ea9ba88..6937863db7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5924,10 +5924,7 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNU= C_UNUSED, static int virDomainDefBootOrderPostParse(virDomainDef *def) { - g_autoptr(GHashTable) bootHash =3D NULL; - - if (!(bootHash =3D virHashNew(NULL))) - return -1; + g_autoptr(GHashTable) bootHash =3D virHashNew(NULL); =20 if (virDomainDeviceInfoIterate(def, virDomainDefCollectBootOrder, boot= Hash) < 0) return -1; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940460; cv=none; d=zohomail.com; s=zohoarc; b=GqU/sLcW9/PuWGHnFlNL6jI8HHB9OVBKqXbTymwqrqPGOx/9ZFHF5NEtjVPzP/tq2PHA3j+fZm3v33iAcxN8zpU0Nr8SQ0RUcZI5hZaZO//o6czCubGHu/KAfErPlmYUO0Ku9cQr+q5sf0UjnNhecyHWysEVGaPfrVCiZJ1yZMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940460; 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=knXRk0pklpec6UIEbHzVTTDLGnnnu/AKkyyEE/pKslE=; b=Mb9zZI9X2ViZY6BUse5GxsHsb/D94rCkgQbXWNDkTWICMyQFuRh+vRtZ8ODitFxAiHFvCS4dKuLROtZgoIpPnfRvCp4/1OCZXZIxL/6C43oYeHYePeehDMMCh2I02JQdX5AMxhDXz/ti4o8wxknIhPkg0mMRzbutJw5IUwgVm7g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940460950616.8763135119202; Thu, 22 Jul 2021 00:54:20 -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-104-whCUZP6GN7qeIOsZM3s_RQ-1; Thu, 22 Jul 2021 03:51:21 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D20C1804148; Thu, 22 Jul 2021 07:51:16 +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 B756217C5F; Thu, 22 Jul 2021 07:51: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 8594C181A3ED; Thu, 22 Jul 2021 07:51:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7p97i009851 for ; Thu, 22 Jul 2021 03:51:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 784795DD86; Thu, 22 Jul 2021 07:51:09 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0BE05DD68; Thu, 22 Jul 2021 07:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940460; 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=knXRk0pklpec6UIEbHzVTTDLGnnnu/AKkyyEE/pKslE=; b=MM70SzE2N7BuBdcq6yf+5oH8mrjRlE39OgGBViJRlvCs2IRNpqFSz/fMZ1nPYHAsfGNSdD 53oyjsXUNyXAS6v/gjQx4UjGLYeomejMTvHybbRrHySNzXojCZJA/FyBm77LwwZFD3yetJ W7M2AlVxG7Y5ug0E9rpygOwtuV8oPcA= X-MC-Unique: whCUZP6GN7qeIOsZM3s_RQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 20/38] virDomainDefValidateAliases: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:12 +0200 Message-Id: <20210722075030.25495-21-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940461653100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_validate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index df2ab47361..aab377fbbd 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1261,8 +1261,7 @@ virDomainDefValidateAliases(const virDomainDef *def, int ret =3D -1; =20 /* We are not storing copies of aliases. Don't free them. */ - if (!(data.aliases =3D virHashNew(NULL))) - goto cleanup; + data.aliases =3D virHashNew(NULL); =20 if (virDomainDeviceInfoIterateFlags((virDomainDef *) def, virDomainDeviceDefValidateAliasesI= terator, --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940289; cv=none; d=zohomail.com; s=zohoarc; b=MYstQqm180TtETArI7hFuyMzeGuWjgG4aYNXQdcReId1fetNsaPMB64o9XalPOTuvRM5ZSwJozqKIj3/bLTgIfazfcLf9HGjoi+xysgGztklClSr6wjS05nGYAa3QcycEkNa/xdyhbaohXWVl96/GyaAEQ5XY769hx2B5zxAHCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940289; 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=zr71w6UyQS3YI2Eaq6uEKUbq5TIpC3493xoVQZrvbqQ=; b=ARBuizu2ngzWyPY83hTN+pxX5CMMdEH5le4fu7aMWq/SAOdE7PEOeW1+DokzoIdjM9oLcJ2nsFzakEr35Z/7o1SSnOVMPwJjmE6RiFQD51T9mPvrBC++yIs8MpOQNAJK5NIURQjAiTX7d4XQijl137kOGeWV1d4z+07hzS7QCjw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940289167725.0151214171893; Thu, 22 Jul 2021 00:51:29 -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-172-zEWNsL2rNn287zVyH9dK2A-1; Thu, 22 Jul 2021 03:51:24 -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 E273E8026AC; Thu, 22 Jul 2021 07:51:19 +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 C366F2B0A9; Thu, 22 Jul 2021 07:51:19 +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 919F74A71B; Thu, 22 Jul 2021 07:51:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pAFF009877 for ; Thu, 22 Jul 2021 03:51:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 817745DD86; Thu, 22 Jul 2021 07:51:10 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA9E05DEFA; Thu, 22 Jul 2021 07:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940288; 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=zr71w6UyQS3YI2Eaq6uEKUbq5TIpC3493xoVQZrvbqQ=; b=WbNnogyM9uveQ5AjE/w5oaVxjsOv1nQ0PPKQL2bwoFRZtQmSwzZPY92L6KzFOHmbrId2GS K8bEL8z0NFALbe8l/XqLeESijFmgAldpAToAuvPQsNfi8rQUuRtX2C/tLGAmADiL3mkoIS aQeKCiOd5yfS+9lltwmes29WyX3jDOM= X-MC-Unique: zEWNsL2rNn287zVyH9dK2A-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 21/38] virDomainMomentObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:13 +0200 Message-Id: <20210722075030.25495-22-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940289482100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentob= jlist.c index c0896685a9..17b9c16ae7 100644 --- a/src/conf/virdomainmomentobjlist.c +++ b/src/conf/virdomainmomentobjlist.c @@ -274,10 +274,6 @@ virDomainMomentObjListNew(void) =20 moments =3D g_new0(virDomainMomentObjList, 1); moments->objs =3D virHashNew(virDomainMomentObjListDataFree); - if (!moments->objs) { - VIR_FREE(moments); - return NULL; - } return moments; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940451; cv=none; d=zohomail.com; s=zohoarc; b=Z8JGx5j5YS7pBsJYXy5cD5C1tfQFrQ9OozlpWnMjPu7hZUz8cy0xy92qfVFBFZKw4bFUc2M+YpqvSBdew2SxMttxIUbf6+dwfKAUBFM0ldJ/P0XWMaPk9jggDvX9Mk3UN/RUzMzM4BmJpF/J8ftbro6UPHiIQTeqdxjYDdLD0G4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940451; 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=l6f3QDDOIDuqL+q7AJ6bAAdoWHmVvJXVu8BcU+qXJD0=; b=IQRI449+ttCtBBiuFLj9m6hyrnFDAUuYIb1XHBPhNkNzXPBEomnxUG6n4pUe2LLr1IFveGQspcAIpoge8nPuY3CigdJxG5lYOZOiqF3MB2QXth940GIetLLcwg/jo1aLZGjKhAR8ELmQFFWGBq/soYQpw7k0Iyu/f10IiA3/eSk= 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) 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 1626940451942532.4528787684808; Thu, 22 Jul 2021 00:54:11 -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-270-UaFAl1Q-NH2a51VVKb8kzw-1; Thu, 22 Jul 2021 03:51:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24E1380414A; Thu, 22 Jul 2021 07:51:17 +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 F330F19D7C; Thu, 22 Jul 2021 07:51: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 B9170181A3F1; Thu, 22 Jul 2021 07:51:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pFu6010012 for ; Thu, 22 Jul 2021 03:51:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7CF8C17CF0; Thu, 22 Jul 2021 07:51:15 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6C0F5DD68; Thu, 22 Jul 2021 07:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940451; 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=l6f3QDDOIDuqL+q7AJ6bAAdoWHmVvJXVu8BcU+qXJD0=; b=SDRbdQzs109eUZl/7dbdvAvax9UYNIGdUmSRwzLotzi4R/sZLr2OVOCM6WSDiESwLEFBiO D+oP+NcZJYFbTfYdlklUTOPdi6EHMJtdjBmDpHouZVzawZK2G9xHG2bj9JRRqeavtYxWb7 ugAEYMhH8kJsyibHvwHuu31fsJ96KNs= X-MC-Unique: UaFAl1Q-NH2a51VVKb8kzw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 22/38] virDomainObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:14 +0200 Message-Id: <20210722075030.25495-23-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940453068100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virdomainobjlist.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index 5f9fd9aabc..43d09692a9 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -75,12 +75,8 @@ virDomainObjList *virDomainObjListNew(void) if (!(doms =3D virObjectRWLockableNew(virDomainObjListClass))) return NULL; =20 - if (!(doms->objs =3D virHashNew(virObjectFreeHashData)) || - !(doms->objsName =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(doms); - return NULL; - } - + doms->objs =3D virHashNew(virObjectFreeHashData); + doms->objsName =3D virHashNew(virObjectFreeHashData); return doms; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940288; cv=none; d=zohomail.com; s=zohoarc; b=Wd6FBQeh/cBM5Th8k+l2Mspu7cVGPjDOo7LTDn0tKurvR9LNyDdEj51Yb6THhEerFCt6lTSI8Ih6o5VqF4A+XHkGq34O1jhp/IyW9e8viDX6fUJZS+H/Uo5ZTV/o+Fw4lA0zbSZsjLWQlkIHyOqZrj10JvxSoEZ7iLfMBqtYKVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940288; 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=4wEeTQk7JrIINKpESsPpoLUv368w9qaX/CKBfoYMVxY=; b=R1APyp50zvJQ/+r+TEr9o6ee3m3yWuhmhdcmJ9WiM6GMjk+kx7pEjkcUruwvbikBe3K/0KCBZY8pYK8MohO6jy5014nUDidtJF709c4l5M4UQAb41qEDEo12h8C/bjsV+E4gXZLbS4sPDRlN49/LTQola5tpZrpA+J2ViwnfVHQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940288505471.5361963765846; Thu, 22 Jul 2021 00:51:28 -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-190-DxHFVutOPImJXaf5apRbqg-1; Thu, 22 Jul 2021 03:51:25 -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 492451084F57; Thu, 22 Jul 2021 07:51:20 +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 197EA18432; Thu, 22 Jul 2021 07:51:20 +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 DC5164A71D; Thu, 22 Jul 2021 07:51:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pGa1010025 for ; Thu, 22 Jul 2021 03:51:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 86B3117CF0; Thu, 22 Jul 2021 07:51:16 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id D06E018A6A; Thu, 22 Jul 2021 07:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940287; 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=4wEeTQk7JrIINKpESsPpoLUv368w9qaX/CKBfoYMVxY=; b=K67AqqlWvYbbeQdNjGz0w1J2Eh3O4w/GqFkorSlJ+zyzZVC+mzc56s5PE6zy/pRl/kIrEB P2vbdCD5nE2AXyf69tpyehCGV8ZHBVCN24gGMEU/SVBdQb+pKtPCLaMkU2ccBeEP/XZ4/6 bmC7fmANmN4Mvm+ATrnBKbQQc7QQUd0= X-MC-Unique: DxHFVutOPImJXaf5apRbqg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 23/38] virFileCacheNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:15 +0200 Message-Id: <20210722075030.25495-24-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940289420100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virfilecache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index 2f55deefb6..64348dc1e6 100644 --- a/src/util/virfilecache.c +++ b/src/util/virfilecache.c @@ -242,8 +242,7 @@ virFileCacheNew(const char *dir, if (!(cache =3D virObjectNew(virFileCacheClass))) return NULL; =20 - if (!(cache->table =3D virHashNew(virObjectFreeHashData))) - goto cleanup; + cache->table =3D virHashNew(virObjectFreeHashData); =20 cache->dir =3D g_strdup(dir); =20 @@ -252,10 +251,6 @@ virFileCacheNew(const char *dir, cache->handlers =3D *handlers; =20 return cache; - - cleanup: - virObjectUnref(cache); - return NULL; } =20 =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940326; cv=none; d=zohomail.com; s=zohoarc; b=NM/p/mVj5PVWi4ofR2KYAmqHefhRKay+yCVJ3mR5fb0lZ3U6CFVA+g35tSKcxa+fOxirfRBnj9TDhL8/1565nMM7udnBZxOwtE2iRrXmBv34eu8LIzlutp7mK04ev9GCqOYSdG9pHyFnKkBY+Opmfu8Qn7GM0MhERYx1DxJyxZA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940326; 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=kMAE+mJUKqQSoOJ8XsSrF82KAz/FMMut0i6+nplAzsY=; b=U90KZD6PjA0J4RimDdyCn5/VAWk5jIFIcVxoZ6b4iy7qR5fnkKUHznMsmFNI+dHBOsIC/qqOpIf0YVvmyUwYop3xS8OpUii/LFPK3dyrd8411eTYvcHiXETw19JFAt4OA3bnwguISos4YfmJ3A5dMrLywX6Sg6yCvegaAKHzPYY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940326287385.8760946446555; Thu, 22 Jul 2021 00:52: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-573-Y1rzKEPpOIuVqdzK2eg_qg-1; Thu, 22 Jul 2021 03:51:28 -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 D791F804152; Thu, 22 Jul 2021 07:51:22 +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 BADC160C59; Thu, 22 Jul 2021 07:51:22 +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 7A872181A43F; Thu, 22 Jul 2021 07:51:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pHss010037 for ; Thu, 22 Jul 2021 03:51:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 90B245DD68; Thu, 22 Jul 2021 07:51:17 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA52918A6A; Thu, 22 Jul 2021 07:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940325; 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=kMAE+mJUKqQSoOJ8XsSrF82KAz/FMMut0i6+nplAzsY=; b=WbbFI6Ikg1DfOE+SppYFXT79Gd9ipn5Iizh8QG2cAwv3D/h3lQvwQGuMRFvkaUk/TavnON HmWz6Di6h46z+3S0RUDE1Gwmm0SQ/4AIvQv+Rfa9nk+xdGdjE1WR/R9e/zA+PSJ1ussyES w8r2+EjSWyn+ihm4wC5AWD8NaKvdXeM= X-MC-Unique: Y1rzKEPpOIuVqdzK2eg_qg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 24/38] virHashAtomicNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:16 +0200 Message-Id: <20210722075030.25495-25-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940326941100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virhash.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/virhash.c b/src/util/virhash.c index d2b591c0b7..a9996c9fc0 100644 --- a/src/util/virhash.c +++ b/src/util/virhash.c @@ -102,10 +102,7 @@ virHashAtomicNew(virHashDataFree dataFree) if (!(hash =3D virObjectLockableNew(virHashAtomicClass))) return NULL; =20 - if (!(hash->hash =3D virHashNew(dataFree))) { - virObjectUnref(hash); - return NULL; - } + hash->hash =3D virHashNew(dataFree); return hash; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940326; cv=none; d=zohomail.com; s=zohoarc; b=bmBNg2GCvEogVp0e0hS9Jq3MSpUA9qUJLmh5p0GixoZk21LZTIPd5qIAHtUfMkmR4r1kZmh5JTAs7ZU5Db4Mja5AWzSHrZeyer1Kt5WLaO7p9VnIaev+o8C9D/HqUMxDN7vErEGEU+l1VjeOpmlSCCe3eZvyCWMzFQF0SLsRgGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940326; 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=7re5n+azVU4vtUW5qAn3clArkGDLnx/zT2Aj1CT6P1U=; b=ftdsa1nsEAC+kzT7uYO9uK0dyOYdKDtRx2bMGuJKUaMyJk8oeUEFb8qt9vR8SMsR+q5wwLbTNj4FpR9ikN84o80cts7vuyMTQmEB++MMVRXc192kxmZrYKTDxtSlt1ARNGmKVe43uQc5ORpV1YuxC4IapAaxnFSHaP5SviSVzYU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16269403260661012.2378170053174; Thu, 22 Jul 2021 00:52: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-571-rZMKoiOmMmy6dmwFA88zPA-1; Thu, 22 Jul 2021 03:51:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91EC18026B1; Thu, 22 Jul 2021 07:51:22 +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 662E119D7C; Thu, 22 Jul 2021 07:51:22 +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 2E5BB181A3F5; Thu, 22 Jul 2021 07:51:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pIoi010048 for ; Thu, 22 Jul 2021 03:51:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 97D7812C82; Thu, 22 Jul 2021 07:51:18 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E273E17CF0; Thu, 22 Jul 2021 07:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940325; 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=7re5n+azVU4vtUW5qAn3clArkGDLnx/zT2Aj1CT6P1U=; b=WBq3V4Q1u0sOnZJ4RUfYxNE6YtNfIgp58q4JY8SRD4dyIZ3fhdUJnQgIn6gZgKBp1mB/bp nYbVODW8a6DDS+AVfs5S6xNCznuG8PMuhTirPv57dxQ0mNlcPgJY1JQg89K3E8WNTxVtcP DP6lpVfm76t/ju9481d9QqR6yfy7dCs= X-MC-Unique: rZMKoiOmMmy6dmwFA88zPA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 25/38] virInterfaceObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:17 +0200 Message-Id: <20210722075030.25495-26-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940326945100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virinterfaceobj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index c8fda4990f..a73208f1fc 100644 --- a/src/conf/virinterfaceobj.c +++ b/src/conf/virinterfaceobj.c @@ -142,10 +142,7 @@ virInterfaceObjListNew(void) if (!(interfaces =3D virObjectRWLockableNew(virInterfaceObjListClass))) return NULL; =20 - if (!(interfaces->objsName =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(interfaces); - return NULL; - } + interfaces->objsName =3D virHashNew(virObjectFreeHashData); =20 return interfaces; } --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940293; cv=none; d=zohomail.com; s=zohoarc; b=XgKYP4TmmrzC3IazvtMEFWrX9pQjMk2BVj94eC25qbFlTV+JiBgmtvO74JKQ2+LlccUj7XV5jybLCwNAlQHO1LzNXvW2u/PajM9Ndmwa5TxeQlhpGWKM1u5P46SeydsOejeIoZ7ofxyVkMkh1txLzsekD2Xg5FvVakFbuJXtYIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940293; 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=FRStsrgC4mDYgFa+cdm1jQbI1mk2Mw4+1eEVDjAGWX0=; b=hDuH0f1CpLOzjTRPYO8tVjgJ2UXIVsevxXZjNAhbfQqd+5qm2mxvgWh1vz6parprsaqQpThT4PeqVB1vILFL+S4sTnyIC0ip21q0ujZcK+UzXFKLQ035ttZoymSgB0ni2bBosqhMz3S9wyw2QcHQI9N4zTTAcjorIQOhg4CQBMQ= 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) 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 1626940293637253.36296264862062; Thu, 22 Jul 2021 00:51:33 -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-31-2sUDa7x2N0ucYypWr3HtfA-1; Thu, 22 Jul 2021 03:51:31 -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 7BC44800C78; Thu, 22 Jul 2021 07:51:25 +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 5824910016FD; Thu, 22 Jul 2021 07:51:25 +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 2542050038; Thu, 22 Jul 2021 07:51:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pNxD010131 for ; Thu, 22 Jul 2021 03:51:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id C2ED212C82; Thu, 22 Jul 2021 07:51:23 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A7B5DD86; Thu, 22 Jul 2021 07:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940292; 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=FRStsrgC4mDYgFa+cdm1jQbI1mk2Mw4+1eEVDjAGWX0=; b=Bjqd0vyGUGvdZpDvvBGdOnWSqOPIlnU0csiqteHbfUgZ6Y2I3N4dn617GnxYct/66NnO7J dSzpvlZr2TRfO1Iim6q9irGrugmVRQVjrJgygzJtBOSq/72y2D3pBwOoTMEtqtjXcZAZTO QkFSxOmuDWfoTFIyAksVZMrlhmJXr4Q= X-MC-Unique: 2sUDa7x2N0ucYypWr3HtfA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 26/38] virLockDaemonNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:18 +0200 Message-Id: <20210722075030.25495-27-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940293839100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/locking/lock_daemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 05fc68dc54..f5e5375e80 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -153,8 +153,7 @@ virLockDaemonNew(virLockDaemonConfig *config, bool priv= ileged) virObjectUnref(srv); srv =3D NULL; =20 - if (!(lockd->lockspaces =3D virHashNew(virLockDaemonLockSpaceDataFree)= )) - goto error; + lockd->lockspaces =3D virHashNew(virLockDaemonLockSpaceDataFree); =20 if (!(lockd->defaultLockspace =3D virLockSpaceNew(NULL))) goto error; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940293; cv=none; d=zohomail.com; s=zohoarc; b=iss7I4S0jUNE1J1oWl3zMdtP3AQzszMGoSXhQt7RhL1Pe2oDb4UBL9aMN7Atry0AM4EdsF9R0McWvisOKeESJrgldWkLMDnDFkBKwjOQ27UqNR8m76oOa7KEIRTm/M174Cbu7xWVCbzw5EiP1Q+oxaHaiZEixHpPwNTVXZA51rw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940293; 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=6HfZiOJX+78L4m1pc83zzSccOkPAWPAX0od+xzcj4wU=; b=HL3yODI3rugjb2ZF/kX8QhuF88QymHPWUh0IXY5sPWyahsVxbQsY2K5h0vGOhS1kkchrFIspdW46fCj4tynInfRVqi9A/AeppJnBiNmGz0koXVDdGE0nKkg9fvQUFucvrwjv4dCEOXK1HO2jzdVGMzA/4eBVvCI9053S62g/vPQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940293815282.2561444011001; Thu, 22 Jul 2021 00:51:33 -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-406-gWNAema_NmKmOmGT3JnHXw-1; Thu, 22 Jul 2021 03:51:31 -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 10CE93483C; Thu, 22 Jul 2021 07:51:26 +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 DBF251AC18; Thu, 22 Jul 2021 07:51:25 +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 ABF4E5003C; Thu, 22 Jul 2021 07:51:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pOZS010145 for ; Thu, 22 Jul 2021 03:51:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id CC0C95DD86; Thu, 22 Jul 2021 07:51:24 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 209E25DEFA; Thu, 22 Jul 2021 07:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940292; 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=6HfZiOJX+78L4m1pc83zzSccOkPAWPAX0od+xzcj4wU=; b=U51UgT+3GoXNEUuM56hY60QL9zaE9fNlY6LgrdN4GV0klmU93Ffin/AbcizGhxZAjP51O0 dAC9JOFQI4+TBgN3/fCI7kto5u+6VmZ6GGQw6s3bCpn+kcvBuHC3ucuDTpqoESqEqVPd+A qgfuvBHOboWSHMXm5zfjNV5tYEGnuZA= X-MC-Unique: gWNAema_NmKmOmGT3JnHXw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 27/38] virLockDaemonNewPostExecRestart: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:19 +0200 Message-Id: <20210722075030.25495-28-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940295866100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/locking/lock_daemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index f5e5375e80..fa08acbc76 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -211,8 +211,7 @@ virLockDaemonNewPostExecRestart(virJSONValue *object, b= ool privileged) =20 g_mutex_init(&lockd->lock); =20 - if (!(lockd->lockspaces =3D virHashNew(virLockDaemonLockSpaceDataFree)= )) - goto error; + lockd->lockspaces =3D virHashNew(virLockDaemonLockSpaceDataFree); =20 if (!(child =3D virJSONValueObjectGet(object, "defaultLockspace"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940455; cv=none; d=zohomail.com; s=zohoarc; b=D4EqWfuHBY21pPxlWxFPGi/IPtxcZnrN0ixdz2sgfqbEioMVEzBoS+n/PnqeNAi6cE+WPoDd2aXlnVCQgh2PCDvT8jNFMhTrVvvwMqgRNVRCwkMW3s1B7BM1xBa5Rbkac/nDsmciGtg/dxDwezqDaETaTUbqXQJs888vzg05xsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940455; 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=61hRZPqi5Nx0q28rPf+ROI8c0/RSOr4Zdk6M0k3+Xjg=; b=LxHber4dOuXsVaoen6in600XQGmjwhpGRYbp7RozBxNjKGAQvdXD/aQyxMWeJxM0Lncuw9+YMYvacy7SkaYWx+euBhZzOjXtkAm/8g4yTkB/J3OU6P9lEwTtcjU5aHYRi0CmIE5KOwyP1dCvaFAJZOKPrmfFvDXmwnLzOHancZA= 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) 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 1626940455977174.64426268106263; Thu, 22 Jul 2021 00:54: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-474-wLRP7S7hN1WYG-s-Ia27cA-1; Thu, 22 Jul 2021 03:51:37 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A8F7801FCE; Thu, 22 Jul 2021 07:51:31 +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 23DA81970E; Thu, 22 Jul 2021 07:51:31 +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 E1CB8181A6E2; Thu, 22 Jul 2021 07:51:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pTwF010204 for ; Thu, 22 Jul 2021 03:51:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C98D5DD86; Thu, 22 Jul 2021 07:51:29 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id B44AA12C82; Thu, 22 Jul 2021 07:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940455; 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=61hRZPqi5Nx0q28rPf+ROI8c0/RSOr4Zdk6M0k3+Xjg=; b=AFsSh8fDt1rzto2dggs36G8zKAZLgxjZW6Px8/AEreTDZzER+mtDQ0BT2UaWTjENp6RT/9 85UYMpGzkO71LCWBBmmEiFkR4bvFnSrPWX7G91nqgR8FIcXGjHWAI585gEpGt9iwdRGq6U vaVTnDCElKai5D7Nnr0GgabJoqRH8CU= X-MC-Unique: wLRP7S7hN1WYG-s-Ia27cA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 28/38] virLockSpaceNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:20 +0200 Message-Id: <20210722075030.25495-29-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940457323100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virlockspace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index 9986d8df41..edf2ec907f 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -247,8 +247,7 @@ virLockSpace *virLockSpaceNew(const char *directory) =20 lockspace->dir =3D g_strdup(directory); =20 - if (!(lockspace->resources =3D virHashNew(virLockSpaceResourceDataFree= ))) - goto error; + lockspace->resources =3D virHashNew(virLockSpaceResourceDataFree); =20 if (directory) { if (virFileExists(directory)) { --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940309; cv=none; d=zohomail.com; s=zohoarc; b=abr8h6Ly/28V+0TXHVPR3L13BOoVIOduoRaJ2WXhYPq353Glgso9Ez+3v9XhjHMla2IXcTptmjf+fL7nG7jHF5jj8Vqvw1wbETHKrrA+DM6Sz7qn6nBg16MtPQbhs4Ocrj5I2qdRq/7pFADZ4dawBQ8RyM/YLyxJODQBhgoudPY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940309; 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=+P+EVSm+2TcJpBdkNyQqXgyLkBSLX5Ga3qPpturec9A=; b=flwYHXE2ipZBYmeaT8abbBfU7Xe/Ma8Yt30rmSme/ekTvqkYGfQWOrMfXBFAKfF6FNPnvRD1AT7RloB4DkeLx3ZQH2C6EhAtXMtpv0+rh+rVFSQPPUWwt5GE5/SJ25kUnnJHYycx0LS/vnBAPH6P0uedMQqBfnUgi/quettZDJ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940309336536.435876313934; Thu, 22 Jul 2021 00:51:49 -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-434-FSM5ZF0JNQ6IwH4vNGzZTQ-1; Thu, 22 Jul 2021 03:51:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CAAC363A8; Thu, 22 Jul 2021 07:51:42 +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 D98AD19D7C; Thu, 22 Jul 2021 07:51:41 +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 A77DE5003F; Thu, 22 Jul 2021 07:51:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pdhY010281 for ; Thu, 22 Jul 2021 03:51:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 600A05DD68; Thu, 22 Jul 2021 07:51:39 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id A786C5DAA5; Thu, 22 Jul 2021 07:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940308; 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=+P+EVSm+2TcJpBdkNyQqXgyLkBSLX5Ga3qPpturec9A=; b=RPCrbQ6iFfDr6HDyLDnDbmfap+9D1SBz/yZlZ30YgI3sIKTPKCidD/yQkVu91cd7ut+pUb HBNy6wNLNEczax2XJPPOnS7+hoT86nd8WTjA1doOEfXVNIZB4Jd3aV2YNBLKQNajXXlLue QWuzx+8E6bNuT/o2p9TBBtzGqJ7yWsc= X-MC-Unique: FSM5ZF0JNQ6IwH4vNGzZTQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 29/38] virLockSpaceNewPostExecRestart: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:21 +0200 Message-Id: <20210722075030.25495-30-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940311547100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/virlockspace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index edf2ec907f..0c4beaf9fe 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -293,8 +293,7 @@ virLockSpace *virLockSpaceNewPostExecRestart(virJSONVal= ue *object) return NULL; } =20 - if (!(lockspace->resources =3D virHashNew(virLockSpaceResourceDataFree= ))) - goto error; + virHashNew(virLockSpaceResourceDataFree); =20 if (virJSONValueObjectHasKey(object, "directory")) { const char *dir =3D virJSONValueObjectGetString(object, "directory= "); --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940394; cv=none; d=zohomail.com; s=zohoarc; b=kt3vjvlzNXltp4I1ZwbcHS13OPvuxOAdW3EsmJO3B0C9PFtxyEQ3n19aIVo8ptSX4IbxIoJ4OeUbGh0samYn8CHN+OnbQBOOMvJVYz5a6zG3V2qzpcZ1TLSW+9sIWJqKhk2hinuKzDOAKF0AhUK9x7LNGDeCilKWltprEUYBNYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940394; 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=+CxV8xALZMnuthhz0thLHsI8tLAdZuHNcaYPnLG9gno=; b=c6WFyCu/etb6qUrX73v3z8PRjjgrldfiAoCiXkJKysEuAu3jSspSpxl7oOtb7znyaRWQJvrdN8jdS27rpktBeGUG6L5Ja7a5NbFdJkEpuwaKagCbapNawZhAFoY8bQK03gT3jv2okiLhcW9Wk09xAcOsCQ7BuXherUAEoQ2IKO4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940394809153.52721774032682; Thu, 22 Jul 2021 00:53:14 -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-62-2hgMK1TiMaO0akyTgXBSrg-1; Thu, 22 Jul 2021 03:51:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 40E681934100; Thu, 22 Jul 2021 07:51:45 +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 246EF5C1D1; Thu, 22 Jul 2021 07:51:45 +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 DCE3A181A29D; Thu, 22 Jul 2021 07:51:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7peZg010287 for ; Thu, 22 Jul 2021 03:51:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 96B575DD86; Thu, 22 Jul 2021 07:51:40 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF3DB5DD68; Thu, 22 Jul 2021 07:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940393; 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=+CxV8xALZMnuthhz0thLHsI8tLAdZuHNcaYPnLG9gno=; b=HmXbYW9gZ8pwpfrER14G9H+W3cysvCf6z6gSzYRqYUvDWfM2Qqptja5dX7/4BvOvr/jVYF wbk6mbKoBA0MbqvT2VLUyZy47U8islR9Ux1zg/Uf5Cg2Rmh7qddRgoQ5PvOl/tHRTGKlve y/7me5KgfAgBr7prR/dNuAW/lwdNSE4= X-MC-Unique: 2hgMK1TiMaO0akyTgXBSrg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 30/38] virNetDaemonNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:22 +0200 Message-Id: <20210722075030.25495-31-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940395293100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/rpc/virnetdaemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index 1a17753f42..b6f3233f64 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -141,8 +141,7 @@ virNetDaemonNew(void) if (!(dmn =3D virObjectLockableNew(virNetDaemonClass))) return NULL; =20 - if (!(dmn->servers =3D virHashNew(virObjectFreeHashData))) - goto error; + dmn->servers =3D virHashNew(virObjectFreeHashData); =20 #ifndef WIN32 dmn->sigwrite =3D dmn->sigread =3D -1; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940310; cv=none; d=zohomail.com; s=zohoarc; b=ZZiAPN450e/6m3rqiV+KLBxzOFvG6D2DamB1vnG5Td/45qPzUFy/SbDEz0dtnn0X2gkaZtqIMAsg8HnohABl77OzAw5b2hUsOGR4QqLW/AfvTRBiWGsVHxB1/HE7tYBPsUoaSu2+xTHeQyt6pR6t3dNoIHN0/jc9Dkrcb7oHOJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940310; 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=/FEfKddwz2E2USTZVOTqJkDjsz3d9E1lB83TsKGzj3s=; b=etpbCaoKKj+wA4UeUwgVpttS1TZag8IB9rnEnE2OIhgZGWcYu1RJkmI2GKy74EdKCRUWTwIDIEFwevyLS3Ophj3ceDtCGVkJFWG+pPfma55ZomT0g0gCFVxqGuo4DYKRLX8f3eJcCMefCeLUPgReyxJjD4SQ8KUv2hMsg0LUQf4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 162694031042189.92574268497992; Thu, 22 Jul 2021 00:51:50 -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-150-GuC9cb0jOb-o_MQ4eaaepA-1; Thu, 22 Jul 2021 03:51:47 -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 EDC22804141; Thu, 22 Jul 2021 07:51:42 +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 CF9FA60C59; Thu, 22 Jul 2021 07:51:42 +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 9EC7050042; Thu, 22 Jul 2021 07:51:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pf4b010314 for ; Thu, 22 Jul 2021 03:51:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id A04D95DAA5; Thu, 22 Jul 2021 07:51:41 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id E93A45DD68; Thu, 22 Jul 2021 07:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940309; 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=/FEfKddwz2E2USTZVOTqJkDjsz3d9E1lB83TsKGzj3s=; b=Xd8D+j5g5itTnL474HcsTfPwB+fsW7BTrXn14clQhig3l0dxmldBB4q0Id+06kEdFions/ R4N8BuPY1BmdDHEJFpcBOblk+vz/jX6Fgawva4nLJnPjdfQuh5vfXgntE9MVTvbYdih3yK BTqGOAHZz17KmMg/+V3e90Qo+/PO36A= X-MC-Unique: GuC9cb0jOb-o_MQ4eaaepA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 31/38] virNetworkObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:23 +0200 Message-Id: <20210722075030.25495-32-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940311657100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnetworkobj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 341d6b4292..66f916c749 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -350,10 +350,7 @@ virNetworkObjListNew(void) if (!(nets =3D virObjectRWLockableNew(virNetworkObjListClass))) return NULL; =20 - if (!(nets->objs =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(nets); - return NULL; - } + nets->objs =3D virHashNew(virObjectFreeHashData); =20 return nets; } --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940443; cv=none; d=zohomail.com; s=zohoarc; b=S9qW/BwoME18StmuMVL3Q4dkd5UV5jEemFBwroiAatvYhlwh/z0dDbwtPQ6wVnPLCDH4aIOPwrW0XEOJUjOcTbzMOkkioRbIMX/RmodFrnc8NamJXm5t1Rw7trXCSvxb+CvkEj/scfspVSv2CqS0fkLrw+lnycvMJNEmrqvc1hU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940443; 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=7esPH2n3iunfrlNR1m7V0JzWoBucUJSYeP2O3cq1nq4=; b=n8Dd8sRuln8ivMLhCIwJGlvwQKFGUqMIV5aig8xwRBdPook+7e16vgrhujWxmXsEzcLKrEEy80y+3k/rkOI1OUjJQjfHbkKTglm+CYof7h7JOqDglvXglb5qLZ05IKNwN/+f1cVRDZ6Z6Xg3n2N7rmIKxfLkMsa0GXJBkIVj4iI= 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) 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 1626940443319477.49597417155746; Thu, 22 Jul 2021 00:54:03 -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-20-8PNfrVFPPPWoKZFeWQYNyw-1; Thu, 22 Jul 2021 03:51:51 -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 369DC10150A3; Thu, 22 Jul 2021 07:51:46 +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 E8E6460C59; Thu, 22 Jul 2021 07:51:45 +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 B263050046; Thu, 22 Jul 2021 07:51:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pgcL010327 for ; Thu, 22 Jul 2021 03:51:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id A900E5DAA5; Thu, 22 Jul 2021 07:51:42 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2A6C5DD68; Thu, 22 Jul 2021 07:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940442; 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=7esPH2n3iunfrlNR1m7V0JzWoBucUJSYeP2O3cq1nq4=; b=ILvP4urBDwvBs0CKykBS1YAnDyH++R4ygwCxiY0Ud+DQ3b0yvaq0I+kMPa6GdvWNn6DziR unE7M4dJtKPjmTjb8nmCzl4Ba159WZgzuYmkUIxyUdh6Yg078MSO4jJetmTUEnb1pitz8m H0DmV3+KKyQ5bPWHSt8h/lNc228I6ZY= X-MC-Unique: 8PNfrVFPPPWoKZFeWQYNyw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 32/38] virNetworkObjNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:24 +0200 Message-Id: <20210722075030.25495-33-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940444854100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnetworkobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 66f916c749..ea021892c7 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -118,8 +118,7 @@ virNetworkObjNew(void) virBitmapSetBitExpand(obj->classIdMap, 2) < 0) goto error; =20 - if (!(obj->ports =3D virHashNew(virNetworkObjPortFree))) - goto error; + obj->ports =3D virHashNew(virNetworkObjPortFree); =20 virObjectLock(obj); =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940317; cv=none; d=zohomail.com; s=zohoarc; b=CtSmP+K4bdgPwOseS08NZ/DCbVpssMdqxXfSPKgTwFM07bW0+y1lYaRcBD20rSqDv2Rbie1hnqBsrHV2UUzg75y/Eq9JzAaCYRxDNWIQkg78RNb0cerZG8KbavQ6c3EIWEB/ZlMORC3kDdV6WFqtOkwxJZznLIGtn72SdHCBc3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940317; 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=tdgETmYo3xr81cK1nc+yN0tmGMG3XjIugD/mper4eNU=; b=ldiB8/qHeoOm6TGa/F10YfIOUyhkQjuq4qif1IA+tZM5nba5ui9U/40YMc7NlWfCBPIGG+5uELco38jhuAbxWsM/ypxlxrwLfNcoOQ0v/XSLuG4AlXqLr0R44XwluxsyF4fCLVwNNuUo5xOXYkA4sXVux1N0GKhzU8cNAfpaYTU= 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) 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 162694031749997.5968639311144; Thu, 22 Jul 2021 00:51:57 -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-51-c4Y15H2QM8-RHK0Hmpnhdw-1; Thu, 22 Jul 2021 03:51:54 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 456AE10150A0; Thu, 22 Jul 2021 07:51:48 +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 084985C1D1; Thu, 22 Jul 2021 07:51:48 +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 C856E50048; Thu, 22 Jul 2021 07:51:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7phBk010346 for ; Thu, 22 Jul 2021 03:51:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id B95C612C82; Thu, 22 Jul 2021 07:51:43 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A56A5DAA5; Thu, 22 Jul 2021 07:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940316; 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=tdgETmYo3xr81cK1nc+yN0tmGMG3XjIugD/mper4eNU=; b=c6B04ULGP6MM7PpoklL4mpudLUp8tzYFkkcTkn9Ob1vEDtYjCaJGcvkTBuQ432/B3DiccY VdfoWXd7NAwNJnacPj8+zhY9UFEDA+bbeu7DY42iHv1OltmH3JvpLYRpFTyX57MxvKrW+d oY2ttiC7/b68w2AXK57mWkp6YZLFGWY= X-MC-Unique: c4Y15H2QM8-RHK0Hmpnhdw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 33/38] virNodeDeviceObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:25 +0200 Message-Id: <20210722075030.25495-34-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940317983100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnodedeviceobj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index b213592b56..e8f6792138 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -456,10 +456,7 @@ virNodeDeviceObjListNew(void) if (!(devs =3D virObjectRWLockableNew(virNodeDeviceObjListClass))) return NULL; =20 - if (!(devs->objs =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(devs); - return NULL; - } + devs->objs =3D virHashNew(virObjectFreeHashData); =20 return devs; } --=20 2.31.1 From nobody Sun Apr 28 20:38:33 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=1626940319; cv=none; d=zohomail.com; s=zohoarc; b=Ba6ADciIWPpdZB2TDWABa3DGeYDe794e3Dl2D8bRswl7YKfnspO2KYpJkpZcGyA1EJIHEGjzQYLpPcTZwDkAbbL/kDZ2wIunBYeDAsbIZoCnW/mYRe1KbueHiJNSl3E6I3QPcDcj+rteeltyTbPos8+YkOnR9LEjRex+zQeDERk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940319; 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=QwnOFNugkHIXqiLT5xNUajmxtg5riRiKdzhiU3Ym6JU=; b=OXc3cqB1+cnPEvv8hRDdh40hRuquSkIbelx9Ta1ri1uTzInICg8XoeTsh0RDLUY6h69Q5dryVYaV870PnDC/yBPQ+PXd0UoMgjlAdwB3pBVZyPityea8I6MWG22rdkS4y9UesR7f+j/WC+UfIPifgY5CfvTCEHXh6Xnh3HcapBY= 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) 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 1626940319743368.04752947152565; Thu, 22 Jul 2021 00:51:59 -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-413-hwT5b3WaOdaDk481C4YuMg-1; Thu, 22 Jul 2021 03:51:57 -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 22C2F1934109; Thu, 22 Jul 2021 07:51:49 +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 EC3DE669ED; Thu, 22 Jul 2021 07:51:48 +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 AF8B4181A6E5; Thu, 22 Jul 2021 07:51:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7piKX010370 for ; Thu, 22 Jul 2021 03:51:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id C232112C82; Thu, 22 Jul 2021 07:51:44 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 181935DD68; Thu, 22 Jul 2021 07:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940318; 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=QwnOFNugkHIXqiLT5xNUajmxtg5riRiKdzhiU3Ym6JU=; b=ZuqjkytxUCMXXpbpHTsNtyjN1hZjE92VxTVUnYMB30I2ZGoodUfi7CgvBeq6qHqp7r/SVd hdvq+XQUgnZ+g7hpV0EtMhisP7IXaJLPHiW6PM28eDVNqaearfO3Oz513OIwDTdnRjVm2e 1PsJr4WV7ClwXNcr6x5Ek39HVmuAPiI= X-MC-Unique: hwT5b3WaOdaDk481C4YuMg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 34/38] virQEMUCapsProbeQMPHostCPU: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:26 +0200 Message-Id: <20210722075030.25495-35-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940320181100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6cea8c2eca..3804687080 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3045,8 +3045,7 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCaps *qemuCaps, qemuMonitorCPUProperty *nmProp; size_t i; =20 - if (!(hash =3D virHashNew(NULL))) - goto cleanup; + hash =3D virHashNew(NULL); =20 for (i =3D 0; i < modelInfo->nprops; i++) { prop =3D modelInfo->props + i; --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940320; cv=none; d=zohomail.com; s=zohoarc; b=BHTMLUNNFtLzxijsUOuMx5SUT0tAQO5jKJ321EgG6mW2MT5f+bhvcEhdOCctqJMv2VvFhxC/KvroVhjwBJyZAOKPqVlH5iIT+B4RIpzBtNPSmmPzdtshSKwjunatIgLREUwBhhUpBN43PSYiq5O4Q4bmC4etM4ogR2jWzPWFs8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940320; 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=J1r7OfTajkWg5Uf0mhA/1MjiIKGG89vpsdKeUkCDyWQ=; b=WnQ9H7LiDmmgEgZyhEnR+c7yPl08cYLPV8OU1LSNtuHiCqgGLsyOv/l+4qkc6udnhYtUNvIymlrSJxrKO0w0r32oJFAZy6Tkl42TbaMnGB4nzRh2UMUA8mJWfSgEckIwgg8za+Ron62rnd76nwROG3Ie54lp2c4lz5CX0WJIeKQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940320179919.1397216654187; Thu, 22 Jul 2021 00:52:00 -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-538-m9BWMX23P1eiZxcQGJ8RuQ-1; Thu, 22 Jul 2021 03:51:57 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 16993363B4; Thu, 22 Jul 2021 07:51:51 +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 EBB975C1BB; Thu, 22 Jul 2021 07:51:50 +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 B79CC181A6E8; Thu, 22 Jul 2021 07:51:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pjWN010376 for ; Thu, 22 Jul 2021 03:51:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id CC58C12C82; Thu, 22 Jul 2021 07:51:45 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20EB25DAA5; Thu, 22 Jul 2021 07:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940319; 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=J1r7OfTajkWg5Uf0mhA/1MjiIKGG89vpsdKeUkCDyWQ=; b=AW38Tp0e5pd/HwzmPcYbHCr6ByDxnij360tlhNLmn7mng0THUWG6MEdvbGwNF4d1lSuSfP p187uSY2jNneBqp1uBijZdVrB17QrgMpIemyS1aoQqqLCk7QaR2XdWiMAZ4kL4bxnLpWZh lnl5rrWWxHNA7LBi9VEW85AHW3FAK08= X-MC-Unique: m9BWMX23P1eiZxcQGJ8RuQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 35/38] virSecuritySELinuxLXCInitialize: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:27 +0200 Message-Id: <20210722075030.25495-36-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940322110100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/security/security_selinux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 0c2cf1d1c7..0bff9b7bae 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -687,8 +687,7 @@ virSecuritySELinuxLXCInitialize(virSecurityManager *mgr) goto error; } =20 - if (!(data->mcs =3D virHashNew(NULL))) - goto error; + data->mcs =3D virHashNew(NULL); =20 return 0; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940392; cv=none; d=zohomail.com; s=zohoarc; b=R30OFBfyHFW+toYrnpR2gzdRBzoCshhQ/3dSuvCHFYyIR2HgXsedUSspCcGuJF/sfXz1Yz+E/g73YaoXv/hQH6ZuTQIDhcy5XqaP6uJCLUtleUsS9dvJm/KtNTdCi1Db9kRvu+y4jepwN6X8+91ylel5h9E6h2wmIaEnE1dkxiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940392; 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=PDHW7zAj/qtfQEPiEvIBeyxpiUvIX8NfUIOQ/v00OUU=; b=MiuiTR+7dvUb0SXJzvexMzCqkVYXRxbrHtbMx8xpDEn5W4glUPiROo1DC977aU3opffdpWLf0n++YPdB7uj9Y4vL+brUipAojmggMeklwdszCIUS21pP+Bgkp4RANA3n2goZEnjq0qbVbZV6yflV9/CCv6kOXO5ZclgcJeY2IAE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940392038900.4577366679973; Thu, 22 Jul 2021 00:53: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-401-bqB4ftFMOnqmsN9NUVLKEQ-1; Thu, 22 Jul 2021 03:51:58 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 481711934100; Thu, 22 Jul 2021 07:51:51 +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 253335C1D1; Thu, 22 Jul 2021 07:51:51 +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 E795A181A73C; Thu, 22 Jul 2021 07:51:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pk1V010389 for ; Thu, 22 Jul 2021 03:51:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id D770712C82; Thu, 22 Jul 2021 07:51:46 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C76E5DD86; Thu, 22 Jul 2021 07:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940391; 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=PDHW7zAj/qtfQEPiEvIBeyxpiUvIX8NfUIOQ/v00OUU=; b=Z8mXEiBw8Nn9LeSUoi5AI5ACoC4vlRJFOcQTuOHbfz5WeSUrNgDihcXOkSNgBcHQXKhhVg E6ml22UN9q2kTIa63Zau9An6LrD0MU5/RCySHhITXmYBMPK3XL1uqVtEbR0UWKy2qko0wi eKnlMGub6OKqm/q9agIri8P5cWeYVdQ= X-MC-Unique: bqB4ftFMOnqmsN9NUVLKEQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 36/38] virSecuritySELinuxQEMUInitialize: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:28 +0200 Message-Id: <20210722075030.25495-37-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940393119100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/security/security_selinux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 0bff9b7bae..5f98d4d47a 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -758,8 +758,7 @@ virSecuritySELinuxQEMUInitialize(virSecurityManager *mg= r) VIR_DEBUG("Loaded file context '%s', content context '%s'", data->file_context, data->content_context); =20 - if (!(data->mcs =3D virHashNew(NULL))) - goto error; + data->mcs =3D virHashNew(NULL); =20 return 0; =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940320; cv=none; d=zohomail.com; s=zohoarc; b=jo5z004hjUywZbKbHEFbgM/oHyJefK/p/qBrMKeL2YvG8l+6tqdCfvcxBZY8w18q/VqinG8waQ+U9lP0mu1Q2iA/glcGtxmD3W9IzPryYmV/4WJoViLzfPBiKC9IfqEtHczA1CtU/0NrlqQYVuo1PmfRYGxcCtyWIn3MFLYydNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940320; 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=J4eweeeCPw+FFtbVokKCmJslbuTnPhZJ1fbod0MvJsU=; b=TrKWYRMZwgl/iRWz3NPZ8r1+YBXSi0Ap9+c8/VpBysKqLc7xZflIDcxa0j0fgrbKEDS2Y0MWphGedGehMh0fExQzXbQrnDWqk9u/pAfQD+pDXkxYXDXXlZBvdh/q0ss8knPr3MR3KzZBrbnOtlRYKgOjlNZloQfJiCz1PlyGk7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940320181672.5479770862219; Thu, 22 Jul 2021 00:52:00 -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-572-QJepAMbSPrCX_sPAI5BuFA-1; Thu, 22 Jul 2021 03:51:57 -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 1720C804144; Thu, 22 Jul 2021 07:51:52 +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 E9E1418969; Thu, 22 Jul 2021 07:51:51 +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 B89595004B; Thu, 22 Jul 2021 07:51:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7plv1010404 for ; Thu, 22 Jul 2021 03:51:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id E4C2F5DEFB; Thu, 22 Jul 2021 07:51:47 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3668F5DEFA; Thu, 22 Jul 2021 07:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940319; 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=J4eweeeCPw+FFtbVokKCmJslbuTnPhZJ1fbod0MvJsU=; b=jMATSvlgAfL5zWZqwrWUHWKwRt+Y/DTzG5I54SpiAGikeqegg6r6f8pwiDzPm9VNpERrZc EnyIVWgQjsOrOoS1DblWbqplY2h/2u7XQcW+Ixxhdjh3OZbHdDHGS9bgqW+kPpuiFCYlWq ktOQSJ110R95AUF+Q0dpEC1G/Min910= X-MC-Unique: QJepAMbSPrCX_sPAI5BuFA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 37/38] virStoragePoolObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:29 +0200 Message-Id: <20210722075030.25495-38-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940322140100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virstorageobj.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 24957d6012..6c8a06e8bc 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -401,12 +401,8 @@ virStoragePoolObjListNew(void) if (!(pools =3D virObjectRWLockableNew(virStoragePoolObjListClass))) return NULL; =20 - if (!(pools->objs =3D virHashNew(virObjectFreeHashData)) || - !(pools->objsName =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(pools); - return NULL; - } - + pools->objs =3D virHashNew(virObjectFreeHashData); + pools->objsName =3D virHashNew(virObjectFreeHashData); return pools; } =20 --=20 2.31.1 From nobody Sun Apr 28 20:38:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626940322; cv=none; d=zohomail.com; s=zohoarc; b=WtfAV815+tT/COTJFrYgctjp1c3VW7CgbAOFvuOL8BgD9MdJto1hZorwBE60gLlB5o3/hEkikeToG3As8YrzVuwBq2dsrCTnZZ56QhfHonf67idnrJzrqz94SadR0BGcrQU3CF/FNdPGorqV69c3VlteFKUFJ7JKsMprqxiF6M8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626940322; 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=Pvo/4YMH5Y7ZJ+gEkulnfWH7D3AebzeZEq51SdxWMZk=; b=P1ztKXrkTUBe6yfhGvAz+kIzsW8b1yEvhka11YgKSBBJRox033MADSXtHUyjllam0Cl72sBeIFi8wws3oLDeQXwM/D4LhFFVjtT1KSqeCzwhAuUUQ9EV31c5OupqTpfxTYj5EO30HRb2c9Ily/3Uw5Y6gFHiIczSQK390bijFlA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626940322549480.96616612253797; Thu, 22 Jul 2021 00:52:02 -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-590-wsfY0c_kNVm-Z6RynDn3AA-1; Thu, 22 Jul 2021 03:51:59 -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 D586D804142; Thu, 22 Jul 2021 07:51:53 +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 AD1AF66A16; Thu, 22 Jul 2021 07:51:53 +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 71B5F181A877; Thu, 22 Jul 2021 07:51:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M7pmpw010413 for ; Thu, 22 Jul 2021 03:51:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id EBF4C5DF21; Thu, 22 Jul 2021 07:51:48 +0000 (UTC) Received: from work.redhat.com (ovpn-112-127.ams2.redhat.com [10.36.112.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 421885DEFB; Thu, 22 Jul 2021 07:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940321; 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=Pvo/4YMH5Y7ZJ+gEkulnfWH7D3AebzeZEq51SdxWMZk=; b=MratgK+k1rstbLnkdsS2/7emzgfvJ8kLp9vBluakfRjcVVnMgdqhOzbAjyBriVe/J0FtbT SIx0s8gCCaewIBpmfwxRmEyiYPbeSGANL/6PYvbEvoqryUW6Sevi+EMkrI9UqajG2Gut/W /4stB47wPFVWw4hLnzYbsG74wSLohzk= X-MC-Unique: wsfY0c_kNVm-Z6RynDn3AA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 38/38] virStorageVolObjListNew: `virHashNew` cannot return NULL Date: Thu, 22 Jul 2021 09:50:30 +0200 Message-Id: <20210722075030.25495-39-twiederh@redhat.com> In-Reply-To: <20210722075030.25495-1-twiederh@redhat.com> References: <20210722075030.25495-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626940324391100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virstorageobj.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 6c8a06e8bc..2b6932d7e5 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -170,12 +170,9 @@ virStorageVolObjListNew(void) if (!(vols =3D virObjectRWLockableNew(virStorageVolObjListClass))) return NULL; =20 - if (!(vols->objsKey =3D virHashNew(virObjectFreeHashData)) || - !(vols->objsName =3D virHashNew(virObjectFreeHashData)) || - !(vols->objsPath =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(vols); - return NULL; - } + vols->objsKey =3D virHashNew(virObjectFreeHashData); + vols->objsName =3D virHashNew(virObjectFreeHashData); + vols->objsPath =3D virHashNew(virObjectFreeHashData); =20 return vols; } --=20 2.31.1