From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124671 invoked by alias); 16 May 2017 11:20:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124640 invoked by uid 89); 16 May 2017 11:20:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-pf0-f169.google.com Received: from mail-pf0-f169.google.com (HELO mail-pf0-f169.google.com) (209.85.192.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 May 2017 11:20:30 +0000 Received: by mail-pf0-f169.google.com with SMTP id m17so78835212pfg.3 for ; Tue, 16 May 2017 04:20:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Duvou3gI1zN4uoXnWTfA/W1c9/9Nfc/Ib3fIzLi6NhU=; b=KN4wGqY6uNBn7vJXp87NAjJ8veJgAwAjMAohw9jfASLse1o0tkspCgwpkUeQakia7w GDIbGA+VwXrkinLbKYPjNMQy+O9HYI9g+echzQy4OGbZXaB47JkEwSRabSjwWLX5Fgjf ytSxAhekCIHLeuNc1rIdKBmQ14FAPPDzMTJ+W8fvwk9IRQvcr0KaRDLtWaln+ucGxWJw iUAjfTk2w0pW5i2ujimOFLFPHEoFwf+Xev3zWCZR+TSE+IjiKWq7t+BDmsRhvsfM9RUm vZJVB8+Si1TebcI7RMUzt+JalrZGVhq5WUVh5x61ZlT70rKAKjwOEWs8UXVHl+Az28i0 iFmA== X-Gm-Message-State: AODbwcCjn3rPabx85apOMJL9KCgM7B29wQi9QCvucf/yILtGmpTgQ4jz hae6M6UK84U42Ckj X-Received: by 10.84.232.206 with SMTP id x14mr14934856plm.90.1494933631711; Tue, 16 May 2017 04:20:31 -0700 (PDT) Received: from localhost (z209.124-44-183.ppp.wakwak.ne.jp. [124.44.183.209]) by smtp.gmail.com with ESMTPSA id c77sm24904673pfe.37.2017.05.16.04.20.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 04:20:31 -0700 (PDT) Date: Tue, 16 May 2017 11:20:00 -0000 From: Stafford Horne To: Yao Qi Cc: GDB patches , Openrisc , Franck Jullien Subject: Re: [PATCH v6 1/5] tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p Message-ID: <20170516112023.GE2440@lianli.shorne-pla.net> References: <86o9v2t8js.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86o9v2t8js.fsf@gmail.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00339.txt.bz2 On Tue, May 09, 2017 at 03:21:43PM +0100, Yao Qi wrote: > Stafford Horne writes: > > > > if (reggroup == general_reggroup) > > return general_p; > > + > > + if (strcmp (reg->group, reggroup_name (reggroup)) == 0) > > + return 1; > > + > > } > > I read the patch again, and find that we can replace the whole block in > "if (reg != NULL && reg->group != NULL)" with the code this patch adds, > like this, > > if (reg != NULL && reg->group != NULL > && (strcmp (reg->group, reggroup_name (reggroup)) == 0)) > return 1; Thanks, I was thinking to simply to this as well, but I left the patch I inheherited as is. I will also update the commit log and comment to make it more clear what is going on. > -- > Yao (齐尧)