From f53a46e788881f7ac7ee4f1616de897489189ed5 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Tue, 13 Jun 2006 22:47:38 +0000 Subject: [PATCH] removed heisenbug --- src/lladd/lhtable.c | 7 ++++--- test/dfa/fork_bomb.c | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lladd/lhtable.c b/src/lladd/lhtable.c index 19f3ac7..6676f21 100644 --- a/src/lladd/lhtable.c +++ b/src/lladd/lhtable.c @@ -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)); diff --git a/test/dfa/fork_bomb.c b/test/dfa/fork_bomb.c index 8851da5..9657cbb 100644 --- a/test/dfa/fork_bomb.c +++ b/test/dfa/fork_bomb.c @@ -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;