From nobody Mon Feb 9 01:06:29 2026 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1666620931; cv=none; d=zohomail.com; s=zohoarc; b=eZGPl8g+GSAwEzyHx95ojiZO8b/j78Jv1RbR+VZxPgu3mDfOsExgam+FPX7mXzppkRgPvpyIz2JHGFQ3kLcE+5iBSL8gDoFxwwkfINDrVKMQ8ZtEibTlJr8H6a2363idoX/PoiNu0iRd7elX7q3upumRjcC4TP+zX6jQBOXwVmQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620931; 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=6ga/3ylBavVz+zeVULhHSMmT+VJJBl77VwW1cnQoQQ4=; b=SL7z/jnHW+Y/WpVeoCPa8s5+4je8iMQDmMM4Ie67Xym5TAPta8kgvYhRURhHPXH79qJ1UXRG9yf+3vCtKd+pBKw+4QdrdmO1ozWzyyx4/OclecnRk3SaJZLmETvdVeTP2S7UpcCc6/Ec9ksanfUwD5hg2noEzSdAfm82QVlzSps= 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=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.129.124]) by mx.zohomail.com with SMTPS id 1666620931041628.6966487472624; Mon, 24 Oct 2022 07:15:31 -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-379-j23WDEC1ORyEhC_Ou9dt8w-1; Mon, 24 Oct 2022 10:15:23 -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 55BE586F13B; Mon, 24 Oct 2022 14:14:56 +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 03660C2C8C5; Mon, 24 Oct 2022 14:14:56 +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 EDAE21946594; Mon, 24 Oct 2022 14:14:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F16A3194658F for ; Mon, 24 Oct 2022 14:14:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E200140C2088; Mon, 24 Oct 2022 14:14:54 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 543C540C83AA for ; Mon, 24 Oct 2022 14:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666620929; 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=6ga/3ylBavVz+zeVULhHSMmT+VJJBl77VwW1cnQoQQ4=; b=aGVlSIsAfLQih8o8dDPxa+f8TiQfsXfgkNySF0XZp359D9ldDGGuOULvLI0NI185xcK6M/ jICgybrNaGw6xrZzDxXDRMZ0oQLrukaBO+zoGlQPUN+IIhjSbZIY6SaLR3VTr4Z+9HdT6E b4X1XY7TMQu73+EvDebA1vpMV3rG1XE= X-MC-Unique: j23WDEC1ORyEhC_Ou9dt8w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/43] util: xml: Ensure proper header style in virxml.c Date: Mon, 24 Oct 2022 16:14:08 +0200 Message-Id: <9cd03c45e4c064e6c0b915e335e4a1fe6436a53d.1666619795.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 1666620931959100002 Content-Type: text/plain; charset="utf-8" Make the file use consistent header formatting and two line spacing between functions. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virxml.c | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index de7b7a095d..43b1ccfd24 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -121,6 +121,7 @@ virXPathLongBase(const char *xpath, return ret; } + /** * virXPathInt: * @xpath: the XPath string to evaluate @@ -150,6 +151,7 @@ virXPathInt(const char *xpath, return 0; } + /** * virXPathLong: * @xpath: the XPath string to evaluate @@ -170,6 +172,7 @@ virXPathLong(const char *xpath, return virXPathLongBase(xpath, ctxt, 10, value); } + /** * virXPathLongHex: * @xpath: the XPath string to evaluate @@ -191,6 +194,7 @@ virXPathLongHex(const char *xpath, return virXPathLongBase(xpath, ctxt, 16, value); } + static int virXPathULongBase(const char *xpath, xmlXPathContextPtr ctxt, @@ -222,6 +226,7 @@ virXPathULongBase(const char *xpath, return ret; } + /** * virXPathUInt: * @xpath: the XPath string to evaluate @@ -251,6 +256,7 @@ virXPathUInt(const char *xpath, return 0; } + /** * virXPathULong: * @xpath: the XPath string to evaluate @@ -271,6 +277,7 @@ virXPathULong(const char *xpath, return virXPathULongBase(xpath, ctxt, 10, value); } + /** * virXPathUHex: * @xpath: the XPath string to evaluate @@ -292,6 +299,7 @@ virXPathULongHex(const char *xpath, return virXPathULongBase(xpath, ctxt, 16, value); } + /** * virXPathULongLong: * @xpath: the XPath string to evaluate @@ -334,6 +342,7 @@ virXPathULongLong(const char *xpath, return ret; } + /** * virXPathLongLong: * @xpath: the XPath string to evaluate @@ -482,6 +491,7 @@ virXMLNodeContentString(xmlNodePtr node) return ret; } + static int virXMLPropEnumInternal(xmlNodePtr node, const char *name, @@ -967,6 +977,7 @@ virXPathBoolean(const char *xpath, return obj->boolval; } + /** * virXPathNode: * @xpath: the XPath string to evaluate @@ -998,6 +1009,7 @@ virXPathNode(const char *xpath, return obj->nodesetval->nodeTab[0]; } + /** * virXPathNodeSet: * @xpath: the XPath string to evaluate @@ -1133,6 +1145,7 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSE= D, ...) } } + /** * virXMLParseHelper: * @domcode: error domain of the caller, usually VIR_FROM_THIS @@ -1238,7 +1251,10 @@ virXMLParseHelper(int domcode, return g_steal_pointer(&xml); } -const char *virXMLPickShellSafeComment(const char *str1, const char *str2) + +const char * +virXMLPickShellSafeComment(const char *str1, + const char *str2) { if (str1 && !strpbrk(str1, "\r\t\n !\"#$&'()*;<>?[\\]^`{|}~") && !strstr(str1, "--")) @@ -1249,9 +1265,11 @@ const char *virXMLPickShellSafeComment(const char *s= tr1, const char *str2) return NULL; } -static int virXMLEmitWarning(int fd, - const char *name, - const char *cmd) + +static int +virXMLEmitWarning(int fd, + const char *name, + const char *cmd) { size_t len; const char *prologue =3D @@ -1300,6 +1318,7 @@ struct virXMLRewriteFileData { const char *xml; }; + static int virXMLRewriteFile(int fd, const char *path, @@ -1325,6 +1344,7 @@ virXMLRewriteFile(int fd, return 0; } + int virXMLSaveFile(const char *path, const char *warnName, @@ -1337,6 +1357,7 @@ virXMLSaveFile(const char *path, virXMLRewriteFile, &data); } + /** * virXMLNodeToString: convert an XML node ptr to an XML string * @@ -1586,9 +1607,10 @@ virXMLNodeSanitizeNamespaces(xmlNodePtr node) } -static void catchRNGError(void *ctx, - const char *msg, - ...) +static void +catchRNGError(void *ctx, + const char *msg, + ...) { virBuffer *buf =3D ctx; va_list args; @@ -1601,9 +1623,10 @@ static void catchRNGError(void *ctx, } -static void ignoreRNGError(void *ctx G_GNUC_UNUSED, - const char *msg G_GNUC_UNUSED, - ...) +static void +ignoreRNGError(void *ctx G_GNUC_UNUSED, + const char *msg G_GNUC_UNUSED, + ...) {} @@ -1772,6 +1795,7 @@ virXMLFormatElementInternal(virBuffer *buf, virBufferFreeAndReset(childBuf); } + /* same as virXMLFormatElement but outputs an empty element if @attrBuf and * @childBuf are both empty */ void --=20 2.37.3