From d585d4b0286f014c2a8217e45123e8bd889c809f Mon Sep 17 00:00:00 2001 From: FRIGN Date: Mon, 7 Mar 2016 01:43:26 +0100 Subject: [PATCH] No need for += when res is 0 anyway --- sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sort.c b/sort.c index cb6f851..6479461 100644 --- a/sort.c +++ b/sort.c @@ -195,8 +195,8 @@ linecmp(struct linebufline *a, struct linebufline *b) } else { if (!(res = memcmp(col1.data, col2.data, MIN(col1.len, col2.len)))) { - res += col1.data[MIN(col1.len, col2.len)] - - col2.data[MIN(col1.len, col2.len)]; + res = col1.data[MIN(col1.len, col2.len)] - + col2.data[MIN(col1.len, col2.len)]; } }