Fixed to compile and run on origin2000 and origin-pthreads.
[charm.git] / src / conv-ldb / edgelist.c
index 3e3fd0a65347f909a3355bef55179f62ce98aa3c..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;
@@ -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++)