Modules TSC: Handling of RM_Reply* functions.

This commit is contained in:
antirez
2017-05-02 15:05:39 +02:00
parent 9c500b89fb
commit 275905b328
3 changed files with 82 additions and 14 deletions

View File

@@ -341,3 +341,15 @@ void listRotate(list *list) {
tail->next = list->head;
list->head = tail;
}
/* Add all the elements of the list 'o' at the end of the
* list 'l'. The list 'other' remains empty but otherwise valid. */
void listJoin(list *l, list *o) {
l->tail->next = o->head;
o->head->prev = l->tail;
l->tail = o->tail;
/* Setup other as an empty list. */
o->head = l->tail = NULL;
o->len = 0;
}