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 67dc413ed4c5f1b3b01074df760ac93a343f5bae..07f8a12b97511c5eb7f77fdb46f22da89f462592 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));
   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;
     }
     headoffset=0;
     head=head->next;