Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: msnyder@specifix.com
Cc: drow@false.org, gdb-patches@sourceware.org
Subject: Re: [OB] comment fix, corelow.c
Date: Wed, 16 Jan 2008 22:20:00 -0000	[thread overview]
Message-ID: <200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <1200521502.3263.63.camel@localhost.localdomain> (message from 	Michael Snyder on Wed, 16 Jan 2008 14:11:42 -0800)

> From: Michael Snyder <msnyder@specifix.com>
> 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.


  reply	other threads:[~2008-01-16 22:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16  1:17 Michael Snyder
2008-01-16 14:04 ` Daniel Jacobowitz
2008-01-16 22:12   ` Michael Snyder
2008-01-16 22:20     ` Mark Kettenis [this message]
2008-01-16 22:30       ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@specifix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox