From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [PATCH]: Set nr_bytes in remote_write_bytes Date: Mon, 14 May 2001 14:29:00 -0000 Message-id: <3B004E3E.A572A479@cygnus.com> References: <3B002606.5B737A04@cygnus.com> <3B003E94.5020306@cygnus.com> X-SW-Source: 2001-05/msg00313.html Andrew Cagney wrote: > > 2001-05-14 Michael Snyder > > * 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.