From nobody Sun May 19 04:05:42 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 ARC-Seal: i=1; a=rsa-sha256; t=1663294717; cv=none; d=zohomail.com; s=zohoarc; b=VJkL/Oqc2u30oMQIgFzNXJFyg3XwM2hwEGIrazfzqXP0SYMIkdLED1Jk8RwbuLijEp4RNw1psPENGGw6MvK2P+21RlJlz8Zd6I3y5lb0XVku90aEti0CSN7bMVF0qLmQK0y9gGyBAD0jiq3PU4QWlivPzcEj2LS7P5GvSbKgimM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663294717; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2Zbv+tObubbON8uxYy36yQfF2IK7FLdQSAap/dMU94I=; b=DJBZJcAbjuSGEQ44CDakSA0yZ1T3y8siziA3f4DqwDfHJu5DVKX9LkXI1asMeZTWJOlKLdlOE8MxlRu64HpzEWW/mkcDDrJ6DjVlbPQmggoutBCV+/wddzesgky/Gz5Ws0yR8BNPcjv6bn1w27+AeSLPA9YcGMcnWCCl/Iaa2zU= 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 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 1663294717187133.96265811517083; Thu, 15 Sep 2022 19:18:37 -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-657-cOegLAw7NTWBQe6vFW5B6A-1; Thu, 15 Sep 2022 22:18:28 -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 78B4D85A5B6; Fri, 16 Sep 2022 02:18:25 +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 8F54E140EBF4; Fri, 16 Sep 2022 02:18:23 +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 321F91946587; Fri, 16 Sep 2022 02:18:23 +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 ED0C61946586 for ; Fri, 16 Sep 2022 02:18:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C770B140EBF5; Fri, 16 Sep 2022 02:18:21 +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 C35DC140EBF4 for ; Fri, 16 Sep 2022 02:18:21 +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 430CE101A528 for ; Fri, 16 Sep 2022 02:18:21 +0000 (UTC) Received: from cmccmta1.chinamobile.com (cmccmta1.chinamobile.com [221.176.66.79]) by relay.mimecast.com with ESMTP id us-mta-231-MixQ8P6PP0KttM-lYNdB_A-1; Thu, 15 Sep 2022 22:18:18 -0400 Received: from cmccmta.chinamobile.com (unknown[172.16.121.91]) by rmmx-syy-dmz-app04-12004 (RichMail) with SMTP id 2ee46323dc3052e-61a94; Fri, 16 Sep 2022 10:15:13 +0800 (CST) Received: from localhost.localdomain (unknown[223.108.79.103]) by rmsmtp-syy-appsvrnew06-12031 (RichMail) with SMTP id 2eff6323dc2d0cb-adbf3; Fri, 16 Sep 2022 10:15:12 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663294716; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2Zbv+tObubbON8uxYy36yQfF2IK7FLdQSAap/dMU94I=; b=G5l58QTFRe+MFMg1aQBC3Qf5FR+GFfqTWJ0HnZg9RfQGgLPbWCvTz7+tpSN6iro0ejv+oN 885/hhhybLNQIwtCHifFAvy689lyAfwX1S0rfizn6SCuBwm+XwC3zgLDstg67kvN7CW0bT OkbfCEhIXz2Mxvlb2f8YFhB0NiRrJwc= X-MC-Unique: cOegLAw7NTWBQe6vFW5B6A-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: MixQ8P6PP0KttM-lYNdB_A-1 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee46323dc3052e-61a94 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2eff6323dc2d0cb-adbf3 From: dinglimin To: libvir-list@redhat.com Subject: [PATCH] Two branches in a conditional structure should not have exactly the same implementation Date: Fri, 16 Sep 2022 10:15:00 +0800 Message-Id: <20220916021500.1311-1-dinglimin@cmss.chinamobile.com> MIME-Version: 1.0 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 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: , Cc: dinglimin Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 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: 1663294718565100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: dinglimin --- scripts/apibuild.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index c232b4e2c8..5993318490 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -1248,10 +1248,8 @@ class CParser: token[1] =3D=3D "," or token[1] =3D=3D "=3D= "): self.index_add_ref(oldtok[1], self.filenam= e, 0, "type") - elif oldtok[0] =3D=3D "name" and oldtok[1][0:4] =3D=3D= "XEN_": - self.index_add_ref(oldtok[1], self.filename, - 0, "typedef") - elif oldtok[0] =3D=3D "name" and oldtok[1][0:7] =3D=3D= "LIBXEN_": + elif oldtok[0] =3D=3D "name" and (oldtok[1][0:4] =3D= =3D "XEN_" or + oldtok[1][0:7] =3D=3D "LIBXEN_"): self.index_add_ref(oldtok[1], self.filename, 0, "typedef") =20 --=20 2.30.0.windows.2