On Wed, 2011-03-16 at 14:27 -0700, Roland McGrath wrote:
> <pedantic> The comment and the return inside the while
loop was
> confusing me at first. It would maybe be slightly easier on the reader
> to replace the "return DWARF_END_ABBREV;" with a "break;", so
that your
> "at the end already" logic triggers always instead of only on the second
> (or third, etc.) call. </pedantic>
I'm looking at
http://git.fedorahosted.org/git/?p=elfutils.git;a=commitdiff;h=bd1d16c3a1...
and I can't see what you're referring to.
Are we talking about the same change?
Yes.
My confusion was about the comment "second (or third, etc.) call". It
took me a while to understand that above that change, there is a while
loop which on the first call intercepts the abb == NULL itself and
returns a value, but on subsequent calls, when last_abbrev_offset == -1,
it drops out of the loop, and so then this logic triggers. Like I said,
pedantic...