removed heisenbug

This commit is contained in:
Sears Russell 2006-06-13 22:47:38 +00:00
parent 014c1e3e75
commit f53a46e788
2 changed files with 7 additions and 4 deletions

View file

@ -265,9 +265,10 @@ LH_ENTRY(value_t) * LH_ENTRY(insert) (struct LH_ENTRY(table) * table,
assert(!memcmp(thePair->key, key, len));
struct LH_ENTRY(pair_t) * pairInBucket = 0;
// Is thePair in the bucket?
assert((pairInBucket = findInLinkedList(key, len,
&(table->bucketList[bucket]),
&junk)));
pairInBucket = findInLinkedList(key, len,
&(table->bucketList[bucket]),
&junk);
assert(pairInBucket);
assert(pairInBucket == thePair);
// Exactly one time?
assert(!findInLinkedList(key, len, pairInBucket->next, &junk));

View file

@ -91,7 +91,9 @@ int main (int argc, char** argv) {
dfa_initialize_new (dfaSet, 10001, 100);
/* initial_sm1 = allocMachine(&(dfaSet->monoTree)); */
assert(NULL != (initial_sm1 = allocSmash(dfaSet->smash)));
initial_sm1 = allocSmash(dfaSet->smash);
assert(NULL != initial_sm1);
//(initial_sm1 = allocSmash(dfaSet->smash)));
initial_sm1->message.from_machine_id = initial_sm1->machine_id;
initial_sm1->message.to_machine_id = NULL_MACHINE;