X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=struct%2Fskiplist.c;fp=struct%2Fskiplist.c;h=826751c542022ae1efe16b0a2b4a3d4909166a4d;hp=a3fab396f8a16cee038c17d7841b279e5267b71c;hb=f0777b2151019e22458f6f166a8f3c569c32a505;hpb=9b3e566281f7e2ac0683205042796958bfd8939f diff --git a/struct/skiplist.c b/struct/skiplist.c index a3fab39..826751c 100644 --- a/struct/skiplist.c +++ b/struct/skiplist.c @@ -190,7 +190,7 @@ static node_t *find_preds (node_t **preds, node_t **succs, int n, skiplist_t *sl // Fast find that does not help unlink partially removed nodes and does not return the node's predecessors. uint64_t sl_lookup (skiplist_t *sl, const void *key_data, uint32_t key_len) { - TRACE("s3", "sl_lookup: searching for key %p in skiplist %p", key, sl); + TRACE("s3", "sl_lookup: searching for key %p in skiplist %p", key_data, sl); node_t *item = find_preds(NULL, NULL, 0, sl, key_data, key_len, FALSE); // If we found an matching the return its value. @@ -337,7 +337,7 @@ void sl_print (skiplist_t *sl) { if (IS_TAGGED(item->key)) { printf("%s%p:%llx ", is_marked ? "*" : "", item, STRIP_TAG(item->key)); } else { - printf("%s%p:%s ", is_marked ? "*" : "", item, (char *)ns_data(item->key)); + printf("%s%p:%s ", is_marked ? "*" : "", item, (char *)item->key->data); } if (item != sl->head) { printf("[%d]", item->top_level);