Calculate synchronization accuracy within the chull module
[lttv.git] / lttv / lttv / sync / data_structures.c
index c0dafb07814fd2ece75f3fdabca6ab529f359849..acac9d72aaaaf9a15e68ad17e2a206f89d24f695 100644 (file)
@@ -46,7 +46,7 @@ const char* const approxNames[]= {
        [APPROXIMATE]= "Approximate",
        [INCOMPLETE]= "Incomplete",
        [ABSENT]= "Absent",
-       [SCREWED]= "Screwed",
+       [FAIL]= "Fail",
 };
 
 
@@ -699,7 +699,6 @@ AllFactors* createAllFactors(const unsigned int traceNb)
        unsigned int i, j;
 
        allFactors= malloc(sizeof(AllFactors));
-       allFactors->traceNb= traceNb;
        allFactors->refCount= 1;
        allFactors->pairFactors= malloc(traceNb * sizeof(PairFactors*));
        factorsArray=allFactors->pairFactors;
@@ -731,13 +730,17 @@ AllFactors* createAllFactors(const unsigned int traceNb)
  * Free a container of PairFactors
  *
  * Args:
- *   traceNb:      number of traces
  *   allFactors:   container of PairFactors
+ *   traceNb:      number of traces
  */
-void freeAllFactors(AllFactors* const allFactors)
+void freeAllFactors(AllFactors* const allFactors, const unsigned int traceNb)
 {
        unsigned int i, j;
-       const unsigned int traceNb= allFactors->traceNb;
+
+       if (allFactors == NULL)
+       {
+               return;
+       }
 
        allFactors->refCount--;
 
This page took 0.023594 seconds and 4 git commands to generate.