From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26211 invoked by alias); 16 Jan 2008 22:20:12 -0000 Received: (qmail 26202 invoked by uid 22791); 16 Jan 2008 22:20:11 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Jan 2008 22:19:52 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id m0GMJhTQ005811; Wed, 16 Jan 2008 23:19:43 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m0GMJhKt023027; Wed, 16 Jan 2008 23:19:43 +0100 (CET) Date: Wed, 16 Jan 2008 22:20:00 -0000 Message-Id: <200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: msnyder@specifix.com CC: drow@false.org, gdb-patches@sourceware.org In-reply-to: <1200521502.3263.63.camel@localhost.localdomain> (message from Michael Snyder on Wed, 16 Jan 2008 14:11:42 -0800) Subject: Re: [OB] comment fix, corelow.c References: <1200446218.3263.40.camel@localhost.localdomain> <20080116140419.GA30426@caradoc.them.org> <1200521502.3263.63.camel@localhost.localdomain> 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/msg00419.txt.bz2 > 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.