Remove one unnecessary indentation level. Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> --- xdiff/xmerge.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c index ab3448ca88..b5b3f56f92 100644 --- a/xdiff/xmerge.c +++ b/xdiff/xmerge.c @@ -122,19 +122,19 @@ static int xdl_recs_copy_0(int use_orig, xdfenv_t *xe, int i, int count, int nee for (i = 0; i < count; size += recs[i++]->size) if (dest) memcpy(dest + size, recs[i]->ptr, recs[i]->size); - if (add_nl) { - i = recs[count - 1]->size; - if (i == 0 || recs[count - 1]->ptr[i - 1] != '\n') { - if (needs_cr) { - if (dest) - dest[size] = '\r'; - size++; - } - + if (!add_nl) + return size; + i = recs[count - 1]->size; + if (i == 0 || recs[count - 1]->ptr[i - 1] != '\n') { + if (needs_cr) { if (dest) - dest[size] = '\n'; + dest[size] = '\r'; size++; } + + if (dest) + dest[size] = '\n'; + size++; } return size; } -- 2.32.0