X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=doc%2Fexamples%2Frculfhash%2Fcds_lfht_add_unique.c;h=f1a7631d5a4cd5a35522e87754632ecfc1b65d3c;hp=ec594c803961b8b12ff5c328a33d50192d96ede6;hb=34b3f359c81e6400c9b451e49bf9dfaef7963509;hpb=650b434b12597af49cad28c5c4b5faa3c98c04b0 diff --git a/doc/examples/rculfhash/cds_lfht_add_unique.c b/doc/examples/rculfhash/cds_lfht_add_unique.c index ec594c8..f1a7631 100644 --- a/doc/examples/rculfhash/cds_lfht_add_unique.c +++ b/doc/examples/rculfhash/cds_lfht_add_unique.c @@ -33,6 +33,7 @@ struct mynode { struct cds_lfht_node node; /* Chaining in hash table */ }; +static int match(struct cds_lfht_node *ht_node, const void *_key) { struct mynode *node = @@ -113,11 +114,11 @@ int main(int argc, char **argv) * match. It did not add the new node to the * hash table, so we can free it on the spot. */ - printf("Not adding duplicate key: %d, seqnum: %d\n", + printf("Not adding duplicate (key: %d, seqnum: %d)\n", node->value, node->seqnum); free(node); } else { - printf("Add key: %d, seqnum: %d\n", + printf("Add (key: %d, seqnum: %d)\n", node->value, node->seqnum); } rcu_read_unlock();