Fixed to compile and run on origin2000 and origin-pthreads.
[charm.git] / src / conv-ldb / edgelist.c
index c8ebd76a7b45d036d162ef804d342c296b4e1d06..dbd9d51824b0482e27a9b68cd12a9d4d440feb5f 100644 (file)
@@ -10,12 +10,14 @@ int E;
   EdgeListType * edgesRec;
 
   edgesRec = (EdgeListType *) malloc(sizeof(EdgeListType));
+  _MEMCHECK(edgesRec);
   edgesRec->next = 0;
   edgesRec->edges = (Edge *) malloc(E*sizeof(Edge));
+  _MEMCHECK(edgesRec->edges);
   return(edgesRec);
 }
 
-addEdge(EdgeList, v,w)
+void addEdge(EdgeList, v,w)
      EdgeListType * EdgeList;
      int v;
      int w;
@@ -23,7 +25,7 @@ addEdge(EdgeList, v,w)
   n = EdgeList->next;
   EdgeList->next++;
 
-  // printf("adding edge: (%d, %d)\n", v, w);
+  /* printf("adding edge: (%d, %d)\n", v, w); */
   ((EdgeList->edges)[n]).node1 = v;
   (EdgeList->edges[n]).node2 = w;
    index =  graph.vertexArray[v].next++;
@@ -35,7 +37,7 @@ addEdge(EdgeList, v,w)
    graph.vertexArray[w].degree++;
 }
 
-printEdges(EdgeList)
+void printEdges(EdgeList)
      EdgeListType * EdgeList;
 {int i;
  Edge * edges;
@@ -47,7 +49,7 @@ printEdges(EdgeList)
 
 int edgeExists(x,y)
 {
-  int deg, i, ind;
+  int i, ind;
   ind = graph.vertexArray[x].adjListInd; 
   
   for(i=0; i< graph.vertexArray[x].degree; i++)