From 2247c64676c062d0cb17980e6af510689595b43a Mon Sep 17 00:00:00 2001 From: ruti <> Date: Sun, 22 Dec 2024 18:24:43 +0300 Subject: [PATCH] Simmetric len cmp --- mpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpool.c b/mpool.c index 0ea3450..01e1af4 100644 --- a/mpool.c +++ b/mpool.c @@ -45,7 +45,7 @@ static int host_cmp(const struct elem *p, const struct elem *q) || (p->len > q->len ? pd[-1] : qd[-1]) == '.') return 0; - return 1; + return p->len > q->len ? 1 : -1; } static int scmp(const struct elem *p, const struct elem *q)