Parcourir la source

Fixed duplicated condition (#2553)

The condition `if(node->prev)` was checked in the previous:
`if( node->prev && n > 5 ) {`
Roman Kalashnikov il y a 7 ans
Parent
commit
9772639ae7
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/common/db.c

+ 1 - 1
src/common/db.c

@@ -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;