@@ -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;
}
Remove one unnecessary indentation level. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- xdiff/xmerge.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)