sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 625f421f5ac1429991e7d2e028a7a97cbe14237c
parent 5dab8bbfa9ff0ae67c02ebf14b7e46c1d8d642e9
Author: Wolfgang Corcoran-Mathe <first.lord.of.teal@gmail.com>
Date:   Wed Jul 22 13:36:37 -0400

join: Use LIMIT macro

Diffstat:
join.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git 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;