Re: [PATCH 1/3] vcs-svn: rename check_overflow arguments for clarity
- From
David Barr <davidbarr@google.com>
- Date
- Feb 2, 2012, 11:25 UTC
- Message-ID
- <CAFfmPPOeFk871m_N+nLXgQx3Uj4wVhgR9BNFzM2ggtseop0JaA@mail.gmail.com>
- In-Reply-To
- <20120202111628.GN3823@burratino>
On Thu, Feb 2, 2012 at 10:16 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 17 quoted lines
> Dmitry Ivankov wrote: >> On Thu, Feb 2, 2012 at 4:59 PM, Jonathan Nieder <jrnieder@gmail.com> wrote: > >>> From: Ramsay Jones <ramsay@ramsay1.demon.co.uk> >>> >>> Code using the argument names a and b just doesn't look right (not >>> sure why!). Use more explicit names "offset" and "len" to make their >>> type and function clearer. >> >> Well, it's still not clear. Given off_t a, size_t b, check that a+b >> fits into type... which type? >> "offset" and "length" don't imply that it's "type of offset" or maybe >> "type of length". > > Hmm... in vector arithmetic, position (i.e., file offset) + displacement > (i.e., size of chunk) = position (i.e., new file offset). Any ideas > for making this clearer?
Maybe rename to check_offset_overflow to make it explicit? -- David Barr