Wrong button :/ Forwarding to the list too... -------- Original Message -------- Subject: Re: [PATCH] fix for programmer error in path split text logic Date: Mon, 09 Dec 2013 21:30:54 +0530 From: Martin Furter <[email protected]> To: Philip Martin <[email protected]>
On 12/09/13 17:13, Philip Martin wrote:
Martin Furter<[email protected]> writes:Index: subversion/libsvn_client/patch.c =================================================================== --- subversion/libsvn_client/patch.c (revision 1549528) +++ subversion/libsvn_client/patch.c (working copy) @@ -568,7 +568,7 @@ else if (*c == '\r') { *eol_str = "\r"; - if (*(c + 1) == '\n') + if (c[1] == '\n') { *eol_str = "\r\n"; b->offset++;Take the case above, the surrounding code uses '*c' in many places so I'd argue that '*(c+1)' is consistent and that 'c[1]' is not an improvement.
I could also argue that it is inconsistent as long as you do not write *c as *(c+0). But this is irrelevant. As you found out the log message is wrong. So here is a honest one: [[[ What led to at least one bug will probably lead to more bugs so remove the ugliness from the code to reduce the possibility of future bugs of this kind. ... ]]] ;) - Martin

