From: Michael Snyder <msnyder@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH]: Set nr_bytes in remote_write_bytes
Date: Mon, 14 May 2001 14:29:00 -0000 [thread overview]
Message-ID: <3B004E3E.A572A479@cygnus.com> (raw)
In-Reply-To: <3B003E94.5020306@cygnus.com>
Andrew Cagney wrote:
>
> 2001-05-14 Michael Snyder <msnyder@redhat.com>
>
> * remote.c (remote_write_bytes): Set nr_bytes to return value of
> bin2hex.
>
> as far as I can tell the code:
>
> > ! bin2hex (myaddr, p, todo);
> > ! nr_bytes = todo;
> > break;
>
> is identical to:
>
> > ! nr_bytes = bin2hex (myaddr, p, todo);
It is identical, assuming that you know the implementation details of bin2hex.
I think it's cleaner to not assume this. Pragmatically it makes no difference,
but this is write_bytes, which implements xfer_memory. In principal it could
return a number smaller than the requested number. I was just coding to that
model.
prev parent reply other threads:[~2001-05-14 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-14 11:38 Michael Snyder
2001-05-14 13:22 ` Andrew Cagney
2001-05-14 14:29 ` 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=3B004E3E.A572A479@cygnus.com \
--to=msnyder@cygnus.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.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