From nobody Tue Apr 30 09:50:30 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=1664804728; cv=none; d=zohomail.com; s=zohoarc; b=Os+1QOUPT9I6kUu70s0z/fFVl2o3YtR96UCCISTnyOVBodScfYv4Vxc/tMUKFDfiZtCyym7sPdagcVLRy/xBamUT/bC52IHkW4yJLgUkL4+RuWPbZTE28xwtnoqOidDOnMnzUbz79TlAp7awo3Q5rDvWVFGnAN+XJoDnmZb3KnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664804728; h=Content-Type:Content-Transfer-Encoding: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=sQaM3fXJLPG2E2FQE1Krx7DpabdSWoP5X3F/zcYaOJA=; b=PvDk+mXXpI0DWYAvhFe7ajFxdCKAzBuF7voPMFpfbtU6vsKBQAEwbzeQgyDQucy7JjEsle1CagdHAjxYbYdjY8EXr/dFFvqK6dcyVwyySsTxx3ZqHfY2PfIbEd20NEjoghk4/uox120AK3awyvJC5rm89b8HYE1x9I8zFbmtIQE= 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 1664804728952701.9184547923345; Mon, 3 Oct 2022 06:45:28 -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-172-u005KZkUNl65Qj0Qj578bg-1; Mon, 03 Oct 2022 09:45:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B686238041C8; Mon, 3 Oct 2022 13:45:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EAD241121315; Mon, 3 Oct 2022 13:45:18 +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 60A3419465B7; Mon, 3 Oct 2022 13:45:18 +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 C5C171946586 for ; Mon, 3 Oct 2022 13:45:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A9B70145888C; Mon, 3 Oct 2022 13:45:16 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED63F145888B for ; Mon, 3 Oct 2022 13:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664804726; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=sQaM3fXJLPG2E2FQE1Krx7DpabdSWoP5X3F/zcYaOJA=; b=Yfg3Ll5WWOQxn4Jy2865zsZ7GUanlQfH4Wq+f02UqUUFxHIfkK+qj9hS9Tuqu1GOdvoCy8 0XNQRR9SlpH+h0GLsXf6QfDk+imgQgqi4e1LPEw0UWy8bip96NVgZTkrZTxZQSM6xQAVcN 39p+4N9iOSmkpng0Fii3MZ1zyF2yWcc= X-MC-Unique: u005KZkUNl65Qj0Qj578bg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] util: xml: Fix declararation of 'const char *' parameters in virXMLProp* helpers Date: Mon, 3 Oct 2022 15:45:12 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1664804730469100001 Content-Type: text/plain; charset="utf-8" We commonly use 'const char *name' instead of 'const char* name'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virxml.c | 20 ++++++++++---------- src/util/virxml.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index a53a52dcf8..c43cc0fd5d 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -517,8 +517,8 @@ virXMLNodeContentString(xmlNodePtr node) static int virXMLPropEnumInternal(xmlNodePtr node, - const char* name, - int (*strToInt)(const char*), + const char *name, + int (*strToInt)(const char *), virXMLPropFlags flags, unsigned int *result, unsigned int defaultResult) @@ -570,7 +570,7 @@ virXMLPropEnumInternal(xmlNodePtr node, */ int virXMLPropTristateBool(xmlNodePtr node, - const char* name, + const char *name, virXMLPropFlags flags, virTristateBool *result) { @@ -590,7 +590,7 @@ virXMLPropTristateBool(xmlNodePtr node, * being omitted entirely */ int virXMLPropTristateBoolAllowDefault(xmlNodePtr node, - const char* name, + const char *name, virXMLPropFlags flags, virTristateBool *result) { @@ -616,7 +616,7 @@ virXMLPropTristateBoolAllowDefault(xmlNodePtr node, */ int virXMLPropTristateSwitch(xmlNodePtr node, - const char* name, + const char *name, virXMLPropFlags flags, virTristateSwitch *result) { @@ -708,7 +708,7 @@ virXMLPropInt(xmlNodePtr node, */ int virXMLPropUInt(xmlNodePtr node, - const char* name, + const char *name, int base, virXMLPropFlags flags, unsigned int *result) @@ -831,7 +831,7 @@ virXMLPropLongLong(xmlNodePtr node, */ int virXMLPropULongLong(xmlNodePtr node, - const char* name, + const char *name, int base, virXMLPropFlags flags, unsigned long long *result) @@ -891,7 +891,7 @@ virXMLPropULongLong(xmlNodePtr node, */ int virXMLPropEnumDefault(xmlNodePtr node, - const char* name, + const char *name, int (*strToInt)(const char*), virXMLPropFlags flags, unsigned int *result, @@ -916,7 +916,7 @@ virXMLPropEnumDefault(xmlNodePtr node, */ int virXMLPropUUID(xmlNodePtr node, - const char* name, + const char *name, virXMLPropFlags flags, unsigned char *result) { @@ -963,7 +963,7 @@ virXMLPropUUID(xmlNodePtr node, */ int virXMLPropEnum(xmlNodePtr node, - const char* name, + const char *name, int (*strToInt)(const char*), virXMLPropFlags flags, unsigned int *result) diff --git a/src/util/virxml.h b/src/util/virxml.h index af58d44835..65db46ca98 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -135,7 +135,7 @@ virXMLPropInt(xmlNodePtr node, int virXMLPropUInt(xmlNodePtr node, - const char* name, + const char *name, int base, virXMLPropFlags flags, unsigned int *result) @@ -152,7 +152,7 @@ virXMLPropLongLong(xmlNodePtr node, int virXMLPropULongLong(xmlNodePtr node, - const char* name, + const char *name, int base, virXMLPropFlags flags, unsigned long long *result) @@ -160,8 +160,8 @@ virXMLPropULongLong(xmlNodePtr node, int virXMLPropEnum(xmlNodePtr node, - const char* name, - int (*strToInt)(const char*), + const char *name, + int (*strToInt)(const char *), virXMLPropFlags flags, unsigned int *result) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) @@ -176,8 +176,8 @@ virXMLPropUUID(xmlNodePtr node, int virXMLPropEnumDefault(xmlNodePtr node, - const char* name, - int (*strToInt)(const char*), + const char *name, + int (*strToInt)(const char *), virXMLPropFlags flags, unsigned int *result, unsigned int defaultResult) --=20 2.37.3 From nobody Tue Apr 30 09:50:30 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=1664804799; cv=none; d=zohomail.com; s=zohoarc; b=M3qf7I/mDsHVhS+dU2gQzey7se764Fd4rdx/2NV40K4DYE+AAlwTCajwrzRvuiC/BZfmlPcJxpoLqUQX54WogxlLpfF1sBJ6pCj8uSwUXnUVAWrRWBOpZ3nCbn8IQfNBXzwmeE9dq9qaEzLXFIAKosw+w4Qigg1vkFdwItnVHBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664804799; h=Content-Type:Content-Transfer-Encoding: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=T/PFaiyctUHuc5B1FfOPwEzj3xYmzX+4j8jPgX2R+gs=; b=aFuzNHnPMG5VWNKfN1jGdkkPuAhuAALFskZf7UCic97Wf2eNXwMMUwtm7LiGBlSFOv8nsto3+OAqVc6IxQ0yB8Csp8HRMiu0tXsN6q9WoLLlaN2vO5Zn6W9BM/6PtM2VffrsyFls6sTMlx/t+wC2z9zxPbTWBf1Cw72lKgwa+ZA= 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 1664804799049390.0560126001402; Mon, 3 Oct 2022 06:46: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-422-YGQlgVfHNYemLqf9Qy9Dag-1; Mon, 03 Oct 2022 09:46:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E34E5886464; Mon, 3 Oct 2022 13:46:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0350C15BA4; Mon, 3 Oct 2022 13:46: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 A5BF0194658C; Mon, 3 Oct 2022 13:45:19 +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 D183E19465B7 for ; Mon, 3 Oct 2022 13:45:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B542B145888E; Mon, 3 Oct 2022 13:45:17 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30F5B145888C for ; Mon, 3 Oct 2022 13:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664804798; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=T/PFaiyctUHuc5B1FfOPwEzj3xYmzX+4j8jPgX2R+gs=; b=LwGk1pK2E7ovHviTv03TzatubsopWfkbWKwTuAK8ioVwFTxB+PnDUv+/GaT/A0DuD3EMTI nzcTh0MBBVhosBIe+Fz3WqC0w9qMidXOkGgZc5MP0W6OEwggGpytUfsbKnnDEzZpRlnDOs fKL02LaNAoPAD/cE8MNoXKW0/b2jKQY= X-MC-Unique: YGQlgVfHNYemLqf9Qy9Dag-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] util: xml: Use common formatting of 'Bitwise-OR' in function param description Date: Mon, 3 Oct 2022 15:45:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1664804800480100001 Content-Type: text/plain; charset="utf-8" Our public API docs use the hyphenated version with capital OR. Fix the virXMLProp* helpers to use the same syntax. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virxml.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index c43cc0fd5d..0548a29e65 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -557,7 +557,7 @@ virXMLPropEnumInternal(xmlNodePtr node, * virXMLPropTristateBool: * @node: XML dom node pointer * @name: Name of the property (attribute) to get - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * * Convenience function to return value of a yes / no attribute. @@ -603,7 +603,7 @@ virXMLPropTristateBoolAllowDefault(xmlNodePtr node, * virXMLPropTristateSwitch: * @node: XML dom node pointer * @name: Name of the property (attribute) to get - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * * Convenience function to return value of an on / off attribute. @@ -632,7 +632,7 @@ virXMLPropTristateSwitch(xmlNodePtr node, * @node: XML dom node pointer * @name: Name of the property (attribute) to get * @base: Number base, see strtol - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * @defaultResult: default value of @result in case the property is not fo= und * @@ -696,7 +696,7 @@ virXMLPropInt(xmlNodePtr node, * @node: XML dom node pointer * @name: Name of the property (attribute) to get * @base: Number base, see strtol - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * * Convenience function to return value of an unsigned integer attribute. @@ -819,7 +819,7 @@ virXMLPropLongLong(xmlNodePtr node, * @node: XML dom node pointer * @name: Name of the property (attribute) to get * @base: Number base, see strtol - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * * Convenience function to return value of an unsigned long long attribute. @@ -879,7 +879,7 @@ virXMLPropULongLong(xmlNodePtr node, * @name: Name of the property (attribute) to get * @strToInt: Conversion function to turn enum name to value. Expected to * return negative value on failure. - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * @defaultResult: default value set to @result in case the property is mi= ssing * @@ -951,7 +951,7 @@ virXMLPropUUID(xmlNodePtr node, * @name: Name of the property (attribute) to get * @strToInt: Conversion function to turn enum name to value. Expected to * return negative value on failure. - * @flags: Bitwise or of virXMLPropFlags + * @flags: Bitwise-OR of virXMLPropFlags * @result: The returned value * * Convenience function to return value of an enum attribute. --=20 2.37.3