From 625f421f5ac1429991e7d2e028a7a97cbe14237c Mon Sep 17 00:00:00 2001 From: Wolfgang Corcoran-Mathe Date: Wed, 22 Jul 2015 13:36:37 -0400 Subject: [PATCH] join: Use LIMIT macro --- join.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/join.c b/join.c index 1f2fb8c..ddccdf1 100644 --- a/join.c +++ b/join.c @@ -173,10 +173,7 @@ linecmp(struct line *la, struct line *lb, size_t jfa, size_t jfb) } else { status = memcmp(la->fields[jfa].s, lb->fields[jfb].s, MAX (la->fields[jfa].len, lb->fields[jfb].len)); - if (status > 0) - status = 1; - else if (status < 0) - status = -1; + LIMIT(status, -1, 1); } return status;