From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m15111.mail.126.com (m15111.mail.126.com [220.181.15.111]) by sourceware.org (Postfix) with ESMTP id 1D69A3858D32 for ; Mon, 19 Sep 2022 10:04:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1D69A3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=126.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=+Vrz3 0MOuuw6O6ytBIPKxdQuLF3j+u+achJ/unMcW8w=; b=FxSRKxVe2RzVmVaP9RMwp 8frDmaCGUCJI+kjlVYJvBTl66imK1t3ViB+2P8uvUScmR2Bn3YHz6tZQkBTmpktC krOn9NpXBwnTvtxep2IvkKId8AVpCEnbKe3k4yuFVnBLP7fRO75sAwf0lQ1bBRz/ t9PBaqQV9I9zk6Bi9QgDuM= Received: from localhost.localdomain (unknown [123.150.8.42]) by smtp1 (Coremail) with SMTP id C8mowADHzJCaPihj6ZaPBw--.45282S2; Mon, 19 Sep 2022 18:04:12 +0800 (CST) From: Xiaole He To: libabigail@sourceware.org Cc: Xiaole He , Xiaole He Subject: [PATCH] abg-reader: fix comment of function Date: Mon, 19 Sep 2022 18:03:50 +0800 Message-Id: <20220919100350.9661-1-hexiaole1994@126.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:C8mowADHzJCaPihj6ZaPBw--.45282S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tr45JF4DCFWxJr4kCw1kGrg_yoW8WFyDpF WrCr1jkw1DGF4fCF92qw4fXFy0k3ykZF4UAws8CrW2y3s5Xw1SgrWfta4Ygry2yr4xCw1F qr4ag3sxG3yrArJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRA9NxUUUUU= X-Originating-IP: [123.150.8.42] X-CM-SenderInfo: 5kh0xt5rohimizu6ij2wof0z/1tbicwh8BlpEB+u+mwABsX X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: In 'src/abg-reader.cc', the function 'walk_xml_node_to_map_type_ids(read_context& ctxt, xmlNodePtr node)' find all of the child nodes of 'node' that has the 'id' attribute, and then put the child node into map where the 'id' of the child node as key and the child node itself as the value. But the comment for this function writes: /* src/abg-reader.cc begin */ /// Walk an entire XML sub-tree to build a map where the key is the /// the value of the 'id' attribute (for type definitions) and the key /// is the xml node containing the 'id' attribute. ... static void walk_xml_node_to_map_type_ids(read_context& ctxt, xmlNodePtr node) ... /* src/abg-reader.cc end */ The second and third lines of the comment above says the the child node as the key of the map, but it should be the value of the map. This patch fix the problematic comment described above, from 'and the key is the xml node' to 'and the value is the xml node'. * src/abg-reader.cc (walk_xml_node_to_map_type_ids): fix comment Signed-off-by: Xiaole He --- src/abg-reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abg-reader.cc b/src/abg-reader.cc index be2b8c13..b6372e50 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -1538,7 +1538,7 @@ advance_cursor(read_context& ctxt) } /// Walk an entire XML sub-tree to build a map where the key is the -/// the value of the 'id' attribute (for type definitions) and the key +/// the value of the 'id' attribute (for type definitions) and the value /// is the xml node containing the 'id' attribute. /// /// @param ctxt the context of the reader. -- 2.27.0