Ignore:
Timestamp:
11/08/11 10:47:14 (8 years ago)
Author:
paulbarber
Message:

Fixed some memory leaks and some compile warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-curve/src/main/c/EcfSingle.c

    r7781 r7803  
    300300        } 
    301301 
     302        free(fitted_preconv); 
     303         
    302304        // OK, so now fitted contains our data for the timeslice of interest. 
    303305        // We can calculate a chisq value and plot the graph, along with 
     
    15821584                                        *chisq += 2.0*(yfit[i]-y[i]) - 2.0*y[i]*log(yfit[i]/y[i]); // was dy[i] * dy[i] * sig2i; 
    15831585                        } 
    1584                         if (*chisq <= 0.0) *chisq = 1.0e308; // don't let chisq=0 through yfit being all -ve 
     1586                        if (*chisq <= 0.0) *chisq = 1.0e38; // don't let chisq=0 through yfit being all -ve 
    15851587                break; 
    15861588 
     
    18221824                        dy[i] = y[i] - yfit[i]; 
    18231825                } 
    1824                 if (*chisq <= 0.0) *chisq = 1.0e308; // don't let chisq=0 through yfit being all -ve 
     1826                if (*chisq <= 0.0) *chisq = 1.0e38; // don't let chisq=0 through yfit being all -ve 
    18251827                break; 
    18261828 
Note: See TracChangeset for help on using the changeset viewer.