From: Michael Snyder <msnyder@specifix.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: drow@false.org, gdb-patches@sourceware.org
Subject: Re: [OB] comment fix, corelow.c
Date: Wed, 16 Jan 2008 22:30:00 -0000 [thread overview]
Message-ID: <1200522604.3263.65.camel@localhost.localdomain> (raw)
In-Reply-To: <200801162219.m0GMJhKt023027@brahms.sibelius.xs4all.nl>
On Wed, 2008-01-16 at 23:19 +0100, Mark Kettenis wrote:
> > 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.
Right. The comments are in lieu of constants.
But by fixing the comment, I did not necessarily volunteer
to fix the lack of constants. ;-)
prev parent reply other threads:[~2008-01-16 22:30 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
2008-01-16 22:30 ` Michael Snyder [this message]
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=1200522604.3263.65.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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