From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8202 invoked by alias); 17 Jun 2009 17:26:53 -0000 Received: (qmail 8193 invoked by uid 22791); 17 Jun 2009 17:26:52 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 17:26:41 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5HHQcZ3019352; Wed, 17 Jun 2009 13:26:38 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5HHQbfL032526; Wed, 17 Jun 2009 13:26:37 -0400 Received: from opsy.redhat.com (vpn-12-224.rdu.redhat.com [10.11.12.224]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5HHQapx030586; Wed, 17 Jun 2009 13:26:37 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id E8434508283; Wed, 17 Jun 2009 11:26:34 -0600 (MDT) To: Samuel Bronson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing. References: <1245209405-9539-1-git-send-email-naesten@gmail.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 17 Jun 2009 17:26:00 -0000 In-Reply-To: <1245209405-9539-1-git-send-email-naesten@gmail.com> (Samuel Bronson's message of "Tue\, 16 Jun 2009 23\:30\:04 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00439.txt.bz2 >>>>> "Samuel" == Samuel Bronson writes: Samuel> Signed-off-by: Samuel Bronson Samuel> --- Samuel> gdb/cli/cli-decode.c | 4 ++-- Samuel> 1 files changed, 2 insertions(+), 2 deletions(-) Needs a ChangeLog entry... Samuel> - int returnvalue=1; /*Needed to avoid double printing*/ Samuel> + int returnvalue=-1; /*Needed to avoid double printing*/ Samuel> /* Walk through the commands */ Samuel> for (c=commandlist;c;c=c->next) Samuel> { Shouldn't this reinitialize returnvalue to -1 each time through the loop? Tom