Merge branch 'master' into discrete-tests

This commit is contained in:
Gregory Lirent 2022-06-05 19:31:27 +03:00
commit aa44980abd
1 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ ssize_t libcdsb_list_get(val_t* x, list_t* s, ssize_t i, _Bool cut) {
c = ldir_dir((lnode_t*)s, dir);
memset(x, 0, sizeof(*x));
if (!is_null(x)) memset(x, 0, sizeof(*x));
while (n && !is_null(c)) {
c = ldir_dir(c, dir);
@ -68,10 +68,10 @@ ssize_t libcdsb_list_find(val_t* x, list_t* s, const void* v, vtype t, _Bool r,
c = ldir_dir((lnode_t*)s, dir);
i = 0;
memset(x, 0, sizeof(*x));
if (!is_null(x)) memset(x, 0, sizeof(*x));
while (!is_null(c)) {
cmp = vtype_compare(vnode_peek(c->node, c->type), c->type, v, t);
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
if (cmp == 0) {
if (!cut && !is_null(x)) {
@ -99,7 +99,7 @@ size_t libcdsb_list_count(const list_t* s, const void* v, vtype t) {
n = 0;
while (!is_null(c)) {
cmp = vtype_compare(vnode_peek(c->node, c->type), c->type, v, t);
cmp = vtype_compare(vnode_peek(&c->node, c->type), c->type, v, t);
if (cmp == 0) ++n;