From nobody Sat May 18 03:46:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1662473678; cv=none; d=zohomail.com; s=zohoarc; b=mfs08ur/JlG21jc0fgY8Dsnr6idrmqUuLEGHRqUZQHsoESMsou5ynjD+t1hBBDUbCApnh0xvHmBlLxM609SBr8JyUSE/QkF4pKkdYHhBmaVPs5Dby+3dsVzsyxFXweUCw/PCzlhZ8vIkYbbKTGlaQkzTqj3Cydw2QJpG7amgXT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662473678; 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=riOIDhdMraGnIgudYnToQvmqMgb09vJqcafKKZXlkC0=; b=Gw725si3tEx8Ue6lyCUhSsn3AUZ6zeBJ9ftkza+F6HPI4Dezpu4pWRyWUEKD2LSOTuQHMkS9kJLVYrGn6jJTeX6io4Dk9ykWL4bs2OkQ+8JW5guABFZHIt0HORebh/uwBjwrKVJLViXjQp4M3G7cUcVsNSpYiHVb5Hcgy1Vmiak= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1662473678459468.7395752440533; Tue, 6 Sep 2022 07:14:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-98jAbCYvPb6UNMauj5PUvg-1; Tue, 06 Sep 2022 10:14:32 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F5B1100EAFC; Tue, 6 Sep 2022 14:14:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF89F2026D4C; Tue, 6 Sep 2022 14:14:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D92DB1946A43; Tue, 6 Sep 2022 14:14:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E8F1D1946A40 for ; Tue, 6 Sep 2022 14:14:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CEF90945D2; Tue, 6 Sep 2022 14:14:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB8494C816 for ; Tue, 6 Sep 2022 14:14:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2E412999B20 for ; Tue, 6 Sep 2022 14:14:28 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-411-Q57qQVxBMjWzFVGSuKMcYA-1; Tue, 06 Sep 2022 10:14:26 -0400 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MMRhJ4pyWzZcD3 for ; Tue, 6 Sep 2022 21:54:24 +0800 (CST) Received: from localhost.localdomain (10.175.104.170) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 6 Sep 2022 21:58:53 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662473677; 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=riOIDhdMraGnIgudYnToQvmqMgb09vJqcafKKZXlkC0=; b=CJGA0CRCHi9ltjFwDj+kM5ajX8hP/k93jfpULvZ10AEPnWgjFh5F2/FSUUI0fwA9gKpBv0 J38/ZSYAwx1SJQUxu769wsnFev/uH9e72o6+AApmULHh6FIxFHcxCUp6gtrNdfcjIntm6D QuW+RAHk9tgkAha04KaHfZ51RlvhhgE= X-MC-Unique: 98jAbCYvPb6UNMauj5PUvg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: Q57qQVxBMjWzFVGSuKMcYA-1 From: Jiacheng Jiang To: Subject: [PATCH 1/3] conf: clean up memory containing secrets before freeing Date: Tue, 6 Sep 2022 21:48:29 +0800 Message-ID: <20220906134831.48490-2-jiangjiacheng@huawei.com> In-Reply-To: <20220906134831.48490-1-jiangjiacheng@huawei.com> References: <20220906134831.48490-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, jiangjiacheng@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: 1662473680412100001 Content-Type: text/plain; charset="utf-8" From: jiangjiacheng The password may not be valid in the error branch, but for higher security, it's better to clean up the memory before freeing it. Signed-off-by: jiangjiacheng Reviewed-by: Kristina Hanicova --- src/conf/domain_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 970cc85ded..d456fd0067 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -60,6 +60,7 @@ #include "virdomainsnapshotobjlist.h" #include "virdomaincheckpointobjlist.h" #include "virutil.h" +#include "virsecureerase.h" =20 #define VIR_FROM_THIS VIR_FROM_DOMAIN =20 @@ -10888,6 +10889,7 @@ virDomainGraphicsAuthDefParseXML(xmlNodePtr node, virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot parse password validity time '%s', ex= pect YYYY-MM-DDTHH:MM:SS"), validTo); + virSecureEraseString(def->passwd); VIR_FREE(def->passwd); return -1; } --=20 2.33.0 From nobody Sat May 18 03:46:12 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=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1662473679; cv=none; d=zohomail.com; s=zohoarc; b=eqaTkdFlxd2mlziOShc1+D4fzJwM+tRBqEH11sq8Bdnt5oSqU/4QgIGdFGDFi5HbloP31lnmlJfNdz12mOJbaG5kzSlDsMavvyeJpNK34wYTkzZsBD7hVJVmQ6jJg9ulLdQhYT8bbdMB6/0vT0k9SQ/8IFzCB97NQ9FhuAJ/VPY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662473679; 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=thPx9nBhW7bGfPt4zv5u8GFuLFp5IX5+hOiRhcGw374=; b=hu3f/eiLSQ9OqmA76KBwu7ZfkXNsiGNwScHMWcuj2ac1s+5z9L5toUEuuaFmjB1X5kUfi8lxH7kZqqUYSOrsWCBuS0xtFr7r8VApxrnqoHCQuAolpOL+0owi383uBM51HYDjRxTucB3sXd3GB2nNLVQtg2fTuPAJ5MpxCirUg7A= 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=fail header.from= (p=quarantine dis=quarantine) 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 1662473679713647.0503051078703; Tue, 6 Sep 2022 07:14:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-TIzjdlN8MpaVBELOoNHdMA-1; Tue, 06 Sep 2022 10:14:26 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C41A785A58A; Tue, 6 Sep 2022 14:14:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADFDB1415102; Tue, 6 Sep 2022 14:14:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 910821946A43; Tue, 6 Sep 2022 14:14:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C93111946A40 for ; Tue, 6 Sep 2022 14:14:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B7B05945D7; Tue, 6 Sep 2022 14:14:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B41299458A for ; Tue, 6 Sep 2022 14:14:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 913028039B9 for ; Tue, 6 Sep 2022 14:14:23 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-j9-pxb-rNfaq7yRfbGNDVQ-1; Tue, 06 Sep 2022 10:14:11 -0400 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MMRj71KjNzkWxf for ; Tue, 6 Sep 2022 21:55:07 +0800 (CST) Received: from localhost.localdomain (10.175.104.170) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 6 Sep 2022 21:58:54 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662473678; 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=thPx9nBhW7bGfPt4zv5u8GFuLFp5IX5+hOiRhcGw374=; b=AiNmTREHlFlDnfEPJrbh9f27m0I5ZmRk31kDrNLoc5xCDen7Jl+x3yHEDc8Mw1nAVvYJ15 WgmVSgtZiizAN1Gje+uteT5WD6c/WkraIblbXKWX2Qt61Oz/jjGmE8D+hQ11tIrZCCia6P 9HWpbLEdGrv2eMuHZATt2Bh/HGlsGxY= X-MC-Unique: TIzjdlN8MpaVBELOoNHdMA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: j9-pxb-rNfaq7yRfbGNDVQ-1 From: Jiacheng Jiang To: Subject: [PATCH 2/3] remote: remove unnecessary return value and if branch Date: Tue, 6 Sep 2022 21:48:30 +0800 Message-ID: <20220906134831.48490-3-jiangjiacheng@huawei.com> In-Reply-To: <20220906134831.48490-1-jiangjiacheng@huawei.com> References: <20220906134831.48490-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, jiangjiacheng@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1662473680418100002 Content-Type: text/plain; charset="utf-8" From: jiangjiacheng Function daemonConfigFilePath() will assign a path to remote_config_file definitely and the path will be validated in following codes. So, it's unnecessary to return value from daemonConfigFilePath() and check the returned value. Signed-off-by: jiangjiacheng Reviewed-by: Kristina Hanicova --- src/remote/remote_daemon.c | 6 +----- src/remote/remote_daemon_config.c | 4 +--- src/remote/remote_daemon_config.h | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 23a5eeb200..36d95de83d 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -903,11 +903,7 @@ int main(int argc, char **argv) { /* No explicit config, so try and find a default one */ if (remote_config_file =3D=3D NULL) { implicit_conf =3D true; - if (daemonConfigFilePath(privileged, - &remote_config_file) < 0) { - VIR_ERROR(_("Can't determine config path")); - exit(EXIT_FAILURE); - } + daemonConfigFilePath(privileged, &remote_config_file); } =20 /* Read the config file if it exists */ diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_c= onfig.c index 330db54651..3567e337c4 100644 --- a/src/remote/remote_daemon_config.c +++ b/src/remote/remote_daemon_config.c @@ -72,7 +72,7 @@ remoteConfigGetAuth(virConf *conf, return 0; } =20 -int +void daemonConfigFilePath(bool privileged, char **configfile) { if (privileged) { @@ -84,8 +84,6 @@ daemonConfigFilePath(bool privileged, char **configfile) =20 *configfile =3D g_strdup_printf("%s/%s.conf", configdir, DAEMON_NA= ME); } - - return 0; } =20 struct daemonConfig* diff --git a/src/remote/remote_daemon_config.h b/src/remote/remote_daemon_c= onfig.h index 47839271d3..9f9e54e838 100644 --- a/src/remote/remote_daemon_config.h +++ b/src/remote/remote_daemon_config.h @@ -99,7 +99,7 @@ struct daemonConfig { }; =20 =20 -int daemonConfigFilePath(bool privileged, char **configfile); +void daemonConfigFilePath(bool privileged, char **configfile); struct daemonConfig* daemonConfigNew(bool privileged); void daemonConfigFree(struct daemonConfig *data); int daemonConfigLoadFile(struct daemonConfig *data, --=20 2.33.0 From nobody Sat May 18 03:46:12 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=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1662473669; cv=none; d=zohomail.com; s=zohoarc; b=KuZre2u4qmOq1KvUjl38EFHSVL5hC4AlYWOmlst/9QiVb716ninQlvurGa5SL89qZUgKq18PN/YJzUVsTZV3XF/nYt4e3evHP/h+bwncoDKw+//CvnAYzxcs/ITqVP5BVKazK30CA3jBibUacf9o96yDawTkP3nWN/OkVrjysZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662473669; 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=VxM/6pFSH88T6uzUWQpUT7ftXz44svEcr5fEj25RIo0=; b=SMvTWLLmdVZiE7YE4InHxbnVSHDDYga5RGIfHLQQ8kReEwHifDsTKkkvxIgcOuPaLZ7P9QexGAwi3kfGVemouXeE+uMegXl825BWk/iDC/usIKqf5P4R9L7/uKQYsznwS7qF5tugXSXMDCm7k/vh/TiddH+S2O+JfTFRwYN18SA= 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=fail header.from= (p=quarantine dis=quarantine) 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 1662473669259342.42095598879723; Tue, 6 Sep 2022 07:14:29 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-34-PK3GLFUaPga9PyiYoqnKDg-1; Tue, 06 Sep 2022 10:14:24 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EA98A2999B20; Tue, 6 Sep 2022 14:14:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 243751415102; Tue, 6 Sep 2022 14:14:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F2A6F1946A43; Tue, 6 Sep 2022 14:14:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 732BA1946A40 for ; Tue, 6 Sep 2022 14:14:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 628691415138; Tue, 6 Sep 2022 14:14:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EA851415137 for ; Tue, 6 Sep 2022 14:14:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 462DE101A56D for ; Tue, 6 Sep 2022 14:14:13 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-49-tCNB1O8KNCaxvk02JGNyVw-1; Tue, 06 Sep 2022 10:14:11 -0400 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MMRj82GsTzkWK8 for ; Tue, 6 Sep 2022 21:55:08 +0800 (CST) Received: from localhost.localdomain (10.175.104.170) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 6 Sep 2022 21:58:55 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662473668; 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=VxM/6pFSH88T6uzUWQpUT7ftXz44svEcr5fEj25RIo0=; b=KRrnKyTfqvjF0I0+ScJVK/q7L7AIx+40E1RM5c1RQ/uCQGPv8zv7Gv1xcHHfzwVxvhs4UK ggDNeeOfjvr95rNWqB13VXhABGMdiuUyT9XzUk2LCFeeMVYfkByiOwyL0g6uiwPIlndLh/ BKuXYufmouj0dx4H7BRxuRt5jlWMzDA= X-MC-Unique: PK3GLFUaPga9PyiYoqnKDg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: tCNB1O8KNCaxvk02JGNyVw-1 From: Jiacheng Jiang To: Subject: [PATCH 3/3] Fix some coding style issues Date: Tue, 6 Sep 2022 21:48:31 +0800 Message-ID: <20220906134831.48490-4-jiangjiacheng@huawei.com> In-Reply-To: <20220906134831.48490-1-jiangjiacheng@huawei.com> References: <20220906134831.48490-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, jiangjiacheng@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1662473670541100003 Content-Type: text/plain; charset="utf-8" From: jiangjiacheng Fix some coding style issues with alignment and spaces. Signed-off-by: jiangjiacheng Reviewed-by: Kristina Hanicova --- src/conf/domain_conf.c | 2 +- src/rpc/virnetserverclient.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d456fd0067..c904d9c63d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26234,7 +26234,7 @@ virDomainMemorytuneDefFormat(virBuffer *buf, &childrenBuf) < 0) return -1; =20 - for (i =3D 0; i< resctrl->nmonitors; i++) { + for (i =3D 0; i < resctrl->nmonitors; i++) { if (virDomainResctrlMonDefFormatHelper(resctrl->monitors[i], VIR_RESCTRL_MONITOR_TYPE_ME= MBW, &childrenBuf) < 0) diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index d57ca07167..a7d2dfa795 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -416,15 +416,15 @@ virNetServerClientNewInternal(unsigned long long id, =20 =20 virNetServerClient *virNetServerClientNew(unsigned long long id, - virNetSocket *sock, - int auth, - bool readonly, - size_t nrequests_max, - virNetTLSContext *tls, - virNetServerClientPrivNew priv= New, - virNetServerClientPrivPreExecR= estart privPreExecRestart, - virFreeCallback privFree, - void *privOpaque) + virNetSocket *sock, + int auth, + bool readonly, + size_t nrequests_max, + virNetTLSContext *tls, + virNetServerClientPrivNew privNe= w, + virNetServerClientPrivPreExecRes= tart privPreExecRestart, + virFreeCallback privFree, + void *privOpaque) { virNetServerClient *client; time_t now; @@ -454,11 +454,11 @@ virNetServerClient *virNetServerClientNew(unsigned lo= ng long id, =20 =20 virNetServerClient *virNetServerClientNewPostExecRestart(virNetServer *srv, - virJSONValue *o= bject, - virNetServerCli= entPrivNewPostExecRestart privNew, - virNetServerCli= entPrivPreExecRestart privPreExecRestart, - virFreeCallback= privFree, - void *privOpaqu= e) + virJSONValue *obj= ect, + virNetServerClien= tPrivNewPostExecRestart privNew, + virNetServerClien= tPrivPreExecRestart privPreExecRestart, + virFreeCallback p= rivFree, + void *privOpaque) { virJSONValue *child; virNetServerClient *client =3D NULL; --=20 2.33.0