Fixed duplicated condition (#2553)
The condition `if(node->prev)` was checked in the previous: `if( node->prev && n > 5 ) {`
This commit is contained in:
parent
618e668bdf
commit
9772639ae7
@ -2920,7 +2920,7 @@ void* linkdb_search( struct linkdb_node** head, void *key)
|
||||
if( node->key == key ) {
|
||||
if( node->prev && n > 5 ) {
|
||||
//Moving the head in order to improve processing efficiency
|
||||
if(node->prev) node->prev->next = node->next;
|
||||
node->prev->next = node->next;
|
||||
if(node->next) node->next->prev = node->prev;
|
||||
node->next = *head;
|
||||
node->prev = (*head)->prev;
|
||||
|
Loading…
x
Reference in New Issue
Block a user