Skip to content

Commit

Permalink
Relocate where we zero the BestGraphInfo; make sure StartMilliseconds…
Browse files Browse the repository at this point in the history
… is also zeroed.
  • Loading branch information
tpn committed Jan 24, 2020
1 parent d6d5658 commit e314c5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PerfectHash/PerfectHashContext.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ Return Value:
Context->Attempts = 0;
Context->ResizeLimit = 0;
Context->InitialTableSize = 0;
Context->StartMilliseconds = 0;
Context->ResizeTableThreshold = 0;
Context->HighestDeletedEdgesCount = 0;
Context->NumberOfTableResizeEvents = 0;
Expand Down Expand Up @@ -887,7 +888,6 @@ Return Value:

ZeroStruct(Context->HexHeaderHash);
ZeroArray(Context->HexHeaderHashBuffer);
ZeroArray(Context->BestGraphInfo);

//
// Suppress concurrency warnings.
Expand All @@ -898,6 +898,7 @@ Return Value:
Context->EqualBestGraphCount = 0;
Context->SpareGraph = NULL;
Context->BestGraph = NULL;
ZeroArray(Context->BestGraphInfo);
_Benign_race_end_

return S_OK;
Expand Down

0 comments on commit e314c5d

Please sign in to comment.