From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16983 invoked by alias); 17 Jun 2009 20:15:57 -0000 Received: (qmail 16966 invoked by uid 22791); 17 Jun 2009 20:15:56 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-yx0-f191.google.com (HELO mail-yx0-f191.google.com) (209.85.210.191) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 20:15:48 +0000 Received: by yxe29 with SMTP id 29so57272yxe.24 for ; Wed, 17 Jun 2009 13:15:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.227.17 with SMTP id z17mr791692ang.172.1245269745928; Wed, 17 Jun 2009 13:15:45 -0700 (PDT) In-Reply-To: References: <1245209405-9539-1-git-send-email-naesten@gmail.com> Date: Wed, 17 Jun 2009 20:15:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing. From: Samuel Bronson To: tromey@redhat.com Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00448.txt.bz2 On Wed, Jun 17, 2009 at 1:26 PM, Tom Tromey wrote: >>>>>> "Samuel" =3D=3D Samuel Bronson writes: > > Samuel> Signed-off-by: Samuel Bronson > Samuel> --- > Samuel> =C2=A0gdb/cli/cli-decode.c | =C2=A0 =C2=A04 ++-- > Samuel> =C2=A01 files changed, 2 insertions(+), 2 deletions(-) Oh, oops, I forgot that git uses the first line of the commit message for the Subject. > Samuel> - =C2=A0int returnvalue=3D1; /*Needed to avoid double printing*/ > Samuel> + =C2=A0int returnvalue=3D-1; /*Needed to avoid double printing*/ > Samuel> =C2=A0 =C2=A0/* Walk through the commands */ > Samuel> =C2=A0 =C2=A0for (c=3Dcommandlist;c;c=3Dc->next) > Samuel> =C2=A0 =C2=A0 =C2=A0{ > > Shouldn't this reinitialize returnvalue to -1 each time through the > loop? Oh ... true! Oops.