From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3879 invoked by alias); 8 Feb 2012 23:32:30 -0000 Received: (qmail 3864 invoked by uid 22791); 8 Feb 2012 23:32:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Feb 2012 23:32:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C1E7C1C6A24; Wed, 8 Feb 2012 18:32:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uY+LSjdg0tVF; Wed, 8 Feb 2012 18:32:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7689F1C69D7; Wed, 8 Feb 2012 18:32:15 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 3C77B145615; Thu, 9 Feb 2012 03:32:11 +0400 (RET) Date: Wed, 08 Feb 2012 23:32:00 -0000 From: Joel Brobecker To: Luis Gustavo Cc: Jan Kratochvil , Pedro Alves , gdb-patches@sourceware.org Subject: Re: [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior] Message-ID: <20120208233211.GC19247@adacore.com> References: <4F20610B.5010403@mentor.com> <4F3291D9.80705@redhat.com> <4F329468.3020307@mentor.com> <4F32990B.7060203@redhat.com> <20120208172728.GA6951@host2.jankratochvil.net> <4F3302F5.1030809@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F3302F5.1030809@mentor.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2012-02/txt/msg00124.txt.bz2 I don't know this area, so cannot formally review, but a minor comment: > + if (a->pspace != b->pspace) > + return (a->pspace > b->pspace) > + - (a->pspace < b->pspace); The GNU Coding Standards asks us to use an extra pair of parentheses in order to help code formatters, even if it is strictly not necessary here, thus: return ((a->pspace > b->pspace) - ((a->pspace < b->pspace))); But going beyond this, ISTM that you can simply put the entire expression on one line and be done with it: if (a->pspace != b->pspace) return (a->pspace > b->pspace) - (a->pspace < b->pspace); -- Joel