Fix GetUsed functions for Host, Flow and Defrag.

pull/168/merge
Victor Julien 13 years ago
parent 2fbb28ece6
commit d1573a366d

@ -642,7 +642,7 @@ static DefragTracker *DefragTrackerGetUsedDefragTracker(void) {
uint32_t cnt = defrag_config.hash_size;
while (cnt--) {
if (idx++ >= defrag_config.hash_size)
if (++idx >= defrag_config.hash_size)
idx = 0;
DefragTrackerHashRow *hb = &defragtracker_hash[idx];

@ -592,7 +592,7 @@ static Flow *FlowGetUsedFlow(void) {
uint32_t cnt = flow_config.hash_size;
while (cnt--) {
if (idx++ >= flow_config.hash_size)
if (++idx >= flow_config.hash_size)
idx = 0;
FlowBucket *fb = &flow_hash[idx];

@ -563,7 +563,7 @@ static Host *HostGetUsedHost(void) {
uint32_t cnt = host_config.hash_size;
while (cnt--) {
if (idx++ >= host_config.hash_size)
if (++idx >= host_config.hash_size)
idx = 0;
HostHashRow *hb = &host_hash[idx];

Loading…
Cancel
Save