diff options
Diffstat (limited to 'src/common/libalgo')
-rw-r--r-- | src/common/libalgo/btree.c | 1 | ||||
-rw-r--r-- | src/common/libalgo/keyval.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/libalgo/btree.c b/src/common/libalgo/btree.c index 08a43ef..20323aa 100644 --- a/src/common/libalgo/btree.c +++ b/src/common/libalgo/btree.c @@ -261,6 +261,7 @@ void* btree_upper(btree_t *t, const void* key) { return i->val; } + void btree_iter(btree_t *t, kv_iter_fun_t f) { void iter_aux(btree_item_t *i, kv_iter_fun_t f) { if (i == 0) return; diff --git a/src/common/libalgo/keyval.c b/src/common/libalgo/keyval.c index 0368aed..528fa90 100644 --- a/src/common/libalgo/keyval.c +++ b/src/common/libalgo/keyval.c @@ -26,7 +26,7 @@ bool str_key_eq_fun(const void* a, const void* b) { } int id_key_cmp_fun(const void* a, const void* b) { - return (b == a ? 0 : (b > a ? 1 : -1)); + return (a == b ? 0 : (a < b ? -1 : 1)); } int str_key_cmp_fun(const void* a, const void* b) { |