From 2cfd9e8f4ddc6a93ee8d00c8a9f2f43f56bc9e06 Mon Sep 17 00:00:00 2001
From: Cojocaru Alexandru <xojoc@gmx.com>
Date: Sun, 28 Apr 2013 11:26:17 +0000
Subject: [PATCH] cut: avoid a branch in `print_kth'

Use || instead of an (if, elseif) pair
---
 src/cut.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/cut.c b/src/cut.c
index 753512e..e051976 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -239,10 +239,11 @@ static bool
 print_kth (size_t k)
 {
   bool k_selected = false;
-  if (0 < eol_range_start && eol_range_start <= k)
-    k_selected = true;
-  else if (current_rp->lo <= k && k <= current_rp->hi)
-    k_selected = true;
+  if ((0 < eol_range_start && eol_range_start <= k) ||
+     (current_rp->lo <= k && k <= current_rp->hi))
+     {
+       k_selected = true;
+     }
 
   return k_selected ^ complement;
 }
-- 
1.8.2.1

