Skip to content

Commit cae9b59

Browse files
committed
Clarify current salt link comment
1 parent 4464b82 commit cae9b59

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/cracker.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ static int crk_key_index, crk_last_key;
9393
static void *crk_last_salt;
9494

9595
/*
96-
* Experimental optimization: while crk_salt_loop() is walking the salt
97-
* linked list, keep the address of the link pointing at the current salt.
98-
* This permits O(1) unlinking of the current salt instead of scanning the
99-
* list from its head for every successful crack.
96+
* While crk_salt_loop() walks the salt linked list, keep a pointer to the
97+
* link that references the current salt. Using a pointer-to-pointer lets
98+
* crk_remove_salt() update that link directly when unlinking the current
99+
* salt, avoiding a scan from the head of the list.
100100
*/
101101
static struct db_salt **crk_current_salt_link;
102102
static struct db_keys *crk_guesses;

0 commit comments

Comments
 (0)