Simmetric len cmp

This commit is contained in:
ruti 2024-12-22 18:24:43 +03:00
parent 0b14bc6d8b
commit 2247c64676

View File

@ -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)