From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16988 invoked by alias); 2 Dec 2013 10:02:53 -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 16977 invoked by uid 89); 2 Dec 2013 10:02:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_40,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2013 10:02:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB2A2gnw030863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Dec 2013 05:02:42 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB2A2edt010287; Mon, 2 Dec 2013 05:02:41 -0500 Message-ID: <529C5AC0.3050008@redhat.com> Date: Mon, 02 Dec 2013 10:02:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix PR remote/15974 References: <1385782688-375-1-git-send-email-yao@codesourcery.com> <5299A894.70100@redhat.com> <529C2B33.20102@codesourcery.com> In-Reply-To: <529C2B33.20102@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00024.txt.bz2 On 12/02/2013 06:39 AM, Yao Qi wrote: > On 11/30/2013 04:57 PM, Pedro Alves wrote: >> Instead of setting and unsetting NC at each iteration, the "canonical" way >> for this sort of thing is to check whether the loop ended: >> >> - if (nc == NULL) >> + for (i == ARRAY_SIZE (notifs)) >> >> And then again, we don't really need NC in the loop. I think >> this would look cleaner and clearer: > > OK, you've fixed that bug :). Pushed it for you. Thanks. -- Pedro Alves