Commit 427e6344 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

replace free() by Free()

parent 66addef1
......@@ -147,7 +147,7 @@ void FreeMean(struct Variable *vars)
for ( int code = 0; code < MaxCodes; code++ )
if ( vars[code].mean )
{
free(vars[code].mean);
Free(vars[code].mean);
vars[code].mean = NULL;
}
}
......
......@@ -334,7 +334,7 @@ void *Distgrid(void *argument)
Free(grids[i].gridsize);
for ( index = 0; index < nsplit; index++ )
free(grids[i].gridindex[index]);
Free(grids[i].gridindex[index]);
Free(grids[i].gridindex);
}
Free(grids);
......
......@@ -293,7 +293,7 @@ void *Harmonic(void *argument)
for ( j = 0; j < n_out; ++j )
{
for ( varID = 0; varID < nvars; ++varID )
free(out[j][varID]);
Free(out[j][varID]);
Free(out[j]);
}
......@@ -303,7 +303,7 @@ void *Harmonic(void *argument)
for ( j = 0; j < n_out*2; ++j )
{
for ( varID = 0; varID < nvars; ++varID )
free(work[j][varID]);
Free(work[j][varID]);
Free(work[j]);
}
......
......@@ -1027,21 +1027,21 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
{
H5Aread(attr, atype_mem, attstring);
if ( ((datasets_t *) opdata)->obj[nset].description )
free(((datasets_t *) opdata)->obj[nset].description);
Free(((datasets_t *) opdata)->obj[nset].description);
((datasets_t *) opdata)->obj[nset].description = strdup(attstring);
}
else if ( strcmp(attname, "title") == 0 )
{
H5Aread(attr, atype_mem, attstring);
if ( ((datasets_t *) opdata)->obj[nset].title )
free(((datasets_t *) opdata)->obj[nset].title);
Free(((datasets_t *) opdata)->obj[nset].title);
((datasets_t *) opdata)->obj[nset].title = strdup(attstring);
}
else if ( strcmp(attname, "time") == 0 )
{
H5Aread(attr, atype_mem, attstring);
if ( ((datasets_t *) opdata)->obj[nset].time )
free(((datasets_t *) opdata)->obj[nset].time);
Free(((datasets_t *) opdata)->obj[nset].time);
((datasets_t *) opdata)->obj[nset].time = strdup(attstring);
}
else if ( strcmp(attname, "unit") == 0 )
......
......@@ -158,7 +158,7 @@ void magplot( const char *plotfile, int operatorID, const char *varname, const c
if( !strcmp( split_str[0],"step_freq" ) )
fprintf( stderr,"STEP_FREQ %d\n",STEP_FREQ );
Free( split_str );
Free(split_str);
}
}
......@@ -449,7 +449,7 @@ void magplot( const char *plotfile, int operatorID, const char *varname, const c
mag_text();
if( LEV_LIST )
Free( LEV_LIST );
Free(LEV_LIST);
}
......@@ -936,7 +936,7 @@ void VerifyPlotParameters( int num_param, char **param_names, int opID )
{
LEV_LIST[k] = atof( split_str1[k] );
}
Free( split_str1 );
Free(split_str1);
}
}
}
......@@ -960,8 +960,8 @@ void VerifyPlotParameters( int num_param, char **param_names, int opID )
fprintf( stderr,"Invalid parameter specification '%s'\n", param_names[i] );
}
if( split_str )
free( split_str );
if ( split_str )
Free(split_str);
} /*** Loop over params ****/
if( halt_flag == TRUE )
......@@ -991,7 +991,7 @@ int checkcolour( char *colour_in )
if( strchr( colour_in,';') == NULL || strstr( colour_in,"RGB(") == NULL )
{
cdoWarning( "Found 'RGB=true',Specify Colour in 'RGB(r;g;b)' ( where r,g,b in [0.0,1.0] ) format!" );
Free( split_str );
Free(split_str);
return 1;
}
......@@ -1020,7 +1020,7 @@ int checkcolour( char *colour_in )
if( split_str_count != 3 )
{
cdoWarning( " Colour specified in Improper format!" );
Free( split_str );
Free(split_str);
return 1;
}
......@@ -1032,18 +1032,18 @@ int checkcolour( char *colour_in )
rgb_values[0] + rgb_values[1] + rgb_values[2] < 0.0f )
{
cdoWarning( " RGB Colour specified with Improper values!" );
Free( split_str );
Free(split_str);
return 1;
}
free( split_str );
Free(split_str);
}
else
{
if( strchr( colour_in,';') != NULL || strstr( colour_in,"RGB(") != NULL )
{
cdoWarning( "Found Colour with 'RGB(r;g;b)' format, set parameter RGB='true' !" );
Free( split_str );
Free(split_str);
return 1;
}
......
......@@ -516,7 +516,7 @@ void VerifyVectorParameters( int num_param, char **param_names, int opID )
}
if( split_str )
free( split_str );
Free( split_str );
}
if( halt_flag == TRUE )
......
......@@ -452,8 +452,8 @@ void *Maskbox(void *argument)
}
fclose(fp);
}
if ( xcoords ) free ( xcoords );
if ( ycoords ) free ( ycoords );
if ( xcoords ) Free( xcoords );
if ( ycoords ) Free( ycoords );
}
int tsID = 0;
......
......@@ -234,7 +234,7 @@ void *Seaspctl(void *argument)
{
nlevels = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
for ( levelID = 0; levelID < nlevels; levelID++ )
free(vars1[varID][levelID].ptr);
Free(vars1[varID][levelID].ptr);
Free(vars1[varID]);
}
......
......@@ -176,8 +176,8 @@ void *Ydayarith(void *argument)
Free(varnmiss2[day][varID]);
}
free(vardata2[day]);
free(varnmiss2[day]);
Free(vardata2[day]);
Free(varnmiss2[day]);
}
if ( field1.ptr ) Free(field1.ptr);
......
......@@ -201,8 +201,8 @@ void *Yhourarith(void *argument)
Free(varnmiss2[houroy][varID]);
}
free(vardata2[houroy]);
free(varnmiss2[houroy]);
Free(vardata2[houroy]);
Free(varnmiss2[houroy]);
}
if ( field1.ptr ) Free(field1.ptr);
......
......@@ -202,8 +202,8 @@ void *Ymonarith(void *argument)
Free(varnmiss2[mon][varID]);
}
free(vardata2[mon]);
free(varnmiss2[mon]);
Free(vardata2[mon]);
Free(varnmiss2[mon]);
}
if ( field1.ptr ) Free(field1.ptr);
......
......@@ -314,7 +314,7 @@ void after_GP2FC(double *gp, double *fc, long nlat, long nlon, long nlev, long n
if ( ifax[9] != nlon )
{
if ( trig ) free (trig);
if ( trig ) Free(trig);
trig = (double *) Malloc(nlon * sizeof(double));
fft_set (trig, ifax, nlon);
}
......@@ -330,7 +330,7 @@ void after_FC2GP(double *fc, double *gp, long nlat, long nlon, long nlev, long n
if ( ifax[9] != nlon )
{
if ( trig ) free (trig);
if ( trig ) Free(trig);
trig = (double *) Malloc(nlon * sizeof(double));
fft_set (trig, ifax, nlon);
}
......
......@@ -1309,8 +1309,8 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXvals(gridID2, xvals2D);
gridDefYvals(gridID2, yvals2D);
free(xvals2D);
free(yvals2D);
Free(xvals2D);
Free(yvals2D);
if ( lbounds )
{
......@@ -1358,15 +1358,15 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXbounds(gridID2, xbounds2D);
gridDefYbounds(gridID2, ybounds2D);
free(xbounds);
free(ybounds);
free(xbounds2D);
free(ybounds2D);
Free(xbounds);
Free(ybounds);
Free(xbounds2D);
Free(ybounds2D);
}
}
free(xvals);
free(yvals);
Free(xvals);
Free(yvals);
gridCopyMask(gridID1, gridID2, gridsize);
......@@ -1439,11 +1439,11 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXunits(gridID2, "degrees_east");
gridDefYunits(gridID2, "degrees_north");
free (imask);
free (xvals);
free (yvals);
if ( xbounds ) free (xbounds);
if ( ybounds ) free (ybounds);
Free(imask);
Free(xvals);
Free(yvals);
if ( xbounds ) Free(xbounds);
if ( ybounds ) Free(ybounds);
gridCopyMask(gridID1, gridID2, gridsize);
......
......@@ -839,7 +839,7 @@ void hetaeta(int ltq, int ngp, const int *imiss,
if ( nvars > 0 )
{
for ( iv = 0; iv < nvars; ++iv )
free(vars_pbl[iv]);
Free(vars_pbl[iv]);
Free(vars_pbl);
}
......
......@@ -174,8 +174,8 @@ int SetMagicsParameterValue( char *param_name, char *param_type, char *param_val
float_param_list[i] = atof( split_str[i] );
}
mag_set1r( param_name, float_param_list, split_str_count );
free( float_param_list );
free( split_str );
Free( float_param_list );
Free( split_str );
}
}
......@@ -200,8 +200,8 @@ int SetMagicsParameterValue( char *param_name, char *param_type, char *param_val
int_param_list[i] = atoi( split_str[i] );
}
mag_set1i( param_name, int_param_list, split_str_count );
free( int_param_list );
free( split_str );
Free( int_param_list );
Free( split_str );
}
}
......@@ -229,7 +229,7 @@ int SetMagicsParameterValue( char *param_name, char *param_type, char *param_val
fprintf( stderr, "Input strarr is %s split str count is %d Sep char is %s\n",param_value, split_str_count, sep_char );
mag_set1c( param_name, (const char**)split_str, split_str_count );
free( split_str );
Free( split_str );
}
else
{
......
......@@ -77,7 +77,7 @@ void eigen_solution_of_symmetric_matrix (double **a, double *eig_val,
eigen_solution_of_triangular_matrix (eig_val, e, n, a, prompt);
free (e);
Free(e);
for (i = 0; i < n; i++)
for (j = i + 1; j < n; j++)
......@@ -345,7 +345,7 @@ int solution_of_linear_equation (double **a, double *b, int n)
if (not_singular)
lu_backsubstitution (a, n, index, b);
free (index);
Free(index);
return not_singular;
}
......@@ -377,8 +377,8 @@ int inverse_of_matrix (double **a, double **b, int n)
}
}
free (index);
free (col);
Free(index);
Free(col);
return not_singular;
}
......@@ -448,7 +448,7 @@ int lu_decomposition (double **a, int n, int *index, int *sign)
}
}
free (v);
Free(v);
return 1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment