Want to zero next "next" pointer, not the one we just wrote.
authorbdemsky <bdemsky>
Mon, 25 Oct 2004 00:04:42 +0000 (00:04 +0000)
committerbdemsky <bdemsky>
Mon, 25 Oct 2004 00:04:42 +0000 (00:04 +0000)
Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc

index 67dc413..07f8a12 100755 (executable)
@@ -132,7 +132,7 @@ void WorkList::add(int id,int type, int lvalue, int rvalue) {
   if (headoffset==WLISTSIZE) {
     if (head->next==0) {
       head->next=(struct ListNode *)malloc(sizeof(struct ListNode));
-      head->next=0;
+      head->next->next=0;
     }
     headoffset=0;
     head=head->next;