From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5137 invoked by alias); 29 Jul 2014 12:59:20 -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 20878 invoked by uid 89); 29 Jul 2014 12:47:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 29 Jul 2014 12:47:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3FD51116104; Tue, 29 Jul 2014 08:47:18 -0400 (EDT) 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 zUNdwpr3zzH3; Tue, 29 Jul 2014 08:47:18 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0F96F1160FB; Tue, 29 Jul 2014 08:47:18 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C83904777F; Tue, 29 Jul 2014 05:47:16 -0700 (PDT) Date: Tue, 29 Jul 2014 13:22:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] simplify target_is_pushed Message-ID: <20140729124716.GB6436@adacore.com> References: <1405711635-1102-1-git-send-email-tromey@redhat.com> <1405711635-1102-3-git-send-email-tromey@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1405711635-1102-3-git-send-email-tromey@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-07/txt/msg00725.txt.bz2 > While working on target_is_pushed, I noticed that it is written in a > strange way. The code currently keeps an extra indirection, where a > simple linked list traversal is all that is needed. It seems likely > this was done by copying and pasting other code. However, there is no > reason to do this and the more obvious code is simpler to reason > about. So, this patch change the implementation. > > 2014-07-18 Tom Tromey > > * target.c (target_is_pushed): Simplify. Indeed. It looks like this one could go in on its own... -- Joel