Re: [PATCH 2/2] blame: simplify prepare_lines()
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 13, 2014, 21:13 UTC
- Message-ID
- <20140613211339.GL8557@google.com>
- In-Reply-To
- <539B5713.10300@web.de>
René Scharfe wrote:
Show 6 quoted lines
> - if (incomplete) > - *lineno++ = len; > + *lineno = len; > > - sb->num_lines = num + incomplete; > + sb->num_lines = num;
This will always treat whatever comes after the last newline as an incomplete line, even if it has zero length. Is that safe? (Not a rhetorical question --- I haven't looked carefully at the caller.)
Thanks, Jonathan