From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32276 invoked by alias); 16 Jan 2008 22:30:26 -0000 Received: (qmail 32261 invoked by uid 22791); 16 Jan 2008 22:30:24 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Jan 2008 22:30:06 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id EDD783C94F; Wed, 16 Jan 2008 14:30:04 -0800 (PST) Subject: Re: [OB] comment fix, corelow.c From: Michael Snyder To: Mark Kettenis Cc: drow@false.org, gdb-patches@sourceware.org In-Reply-To: <200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl> References: <1200446218.3263.40.camel@localhost.localdomain> <20080116140419.GA30426@caradoc.them.org> <1200521502.3263.63.camel@localhost.localdomain> <200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl> Content-Type: text/plain Date: Wed, 16 Jan 2008 22:30:00 -0000 Message-Id: <1200522604.3263.65.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit 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: 2008-01/txt/msg00420.txt.bz2 On Wed, 2008-01-16 at 23:19 +0100, Mark Kettenis wrote: > > From: Michael Snyder > > Date: Wed, 16 Jan 2008 14:11:42 -0800 > > > > On Wed, 2008-01-16 at 09:04 -0500, Daniel Jacobowitz wrote: > > > On Tue, Jan 15, 2008 at 05:16:58PM -0800, Michael Snyder wrote: > > > > cut and paste botch... > > > > > > FYI, no objection, but I think it was right the way it was too... > > > > > > > return (*ops->deprecated_xfer_memory) (offset, readbuf, > > > > - len, 0/*write*/, NULL, ops); > > > > + len, 0/*read*/, NULL, ops); > > > > > > The value of the parameter is 0, and its name was write. > > > > I don't think the comment refers to the name of the parameter. > > > > If you look, there are two adjacent calls to xfer_memory: > > > > if (readbuf) > > return (*ops->deprecated_xfer_memory) (offset, readbuf, > > len, 0/*read*/, NULL, ops); > > if (writebuf) > > return (*ops->deprecated_xfer_memory) (offset, (gdb_byte *) writebuf, > > len, 1/*write*/, NULL, ops); > > > > One call is a read, the other is a write. > > > > None of the other parameters have their names in a comment. > > And if you ask me having those comments is silly in the first place. > It's much better to have appropriate #defines and use those instead. Right. The comments are in lieu of constants. But by fixing the comment, I did not necessarily volunteer to fix the lack of constants. ;-)