From a2da9edb9950366e2267ffa9274753a9eb26449c Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Sat, 3 May 2014 20:39:45 +0200 Subject: [PATCH] sort: simplify skip_columns --- sort.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sort.c b/sort.c index 5af81d2..9ab58d8 100644 --- a/sort.c +++ b/sort.c @@ -206,16 +206,10 @@ skip_columns(char *s, size_t n) size_t i; for(i = 0; i < n; i++) { - if(bflag) { - if(i != 0) - s = next_blank(s); + if(i > 0) + s = end_column(s); + if(bflag) s = next_nonblank(s); - } else { - if(i == 0) - continue; - s = next_nonblank(s); - s = next_blank(s); - } } return s;