- next = pred->next;
- TRACE("l3", "ll_add: attempting to insert item between %p and %p", pred, next);
- if (EXPECT_TRUE(item == NULL)) { item = node_alloc(key_data, key_len, value); }
- item->next = next;
- node_t *other = SYNC_CAS(&pred->next, next, item);
+ TRACE("l3", "ll_cas: attempting to insert item between %p and %p", pred, pred->next);
+ node_t *new_item = node_alloc(key_data, key_len, new_val);
+ node_t *next = new_item->next = pred->next;
+ node_t *other = SYNC_CAS(&pred->next, next, new_item);