Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
427e6344
Commit
427e6344
authored
Oct 16, 2015
by
Uwe Schulzweida
Browse files
replace free() by Free()
parent
66addef1
Changes
16
Hide whitespace changes
Inline
Side-by-side
src/Afterburner.c
View file @
427e6344
...
...
@@ -147,7 +147,7 @@ void FreeMean(struct Variable *vars)
for
(
int
code
=
0
;
code
<
MaxCodes
;
code
++
)
if
(
vars
[
code
].
mean
)
{
f
ree
(
vars
[
code
].
mean
);
F
ree
(
vars
[
code
].
mean
);
vars
[
code
].
mean
=
NULL
;
}
}
...
...
src/Distgrid.c
View file @
427e6344
...
...
@@ -334,7 +334,7 @@ void *Distgrid(void *argument)
Free
(
grids
[
i
].
gridsize
);
for
(
index
=
0
;
index
<
nsplit
;
index
++
)
f
ree
(
grids
[
i
].
gridindex
[
index
]);
F
ree
(
grids
[
i
].
gridindex
[
index
]);
Free
(
grids
[
i
].
gridindex
);
}
Free
(
grids
);
...
...
src/Harmonic.c
View file @
427e6344
...
...
@@ -293,7 +293,7 @@ void *Harmonic(void *argument)
for
(
j
=
0
;
j
<
n_out
;
++
j
)
{
for
(
varID
=
0
;
varID
<
nvars
;
++
varID
)
f
ree
(
out
[
j
][
varID
]);
F
ree
(
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
)
f
ree
(
work
[
j
][
varID
]);
F
ree
(
work
[
j
][
varID
]);
Free
(
work
[
j
]);
}
...
...
src/Importcmsaf.c
View file @
427e6344
...
...
@@ -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
)
f
ree
(((
datasets_t
*
)
opdata
)
->
obj
[
nset
].
description
);
F
ree
(((
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
)
f
ree
(((
datasets_t
*
)
opdata
)
->
obj
[
nset
].
title
);
F
ree
(((
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
)
f
ree
(((
datasets_t
*
)
opdata
)
->
obj
[
nset
].
time
);
F
ree
(((
datasets_t
*
)
opdata
)
->
obj
[
nset
].
time
);
((
datasets_t
*
)
opdata
)
->
obj
[
nset
].
time
=
strdup
(
attstring
);
}
else
if
(
strcmp
(
attname
,
"unit"
)
==
0
)
...
...
src/Magplot.c
View file @
427e6344
...
...
@@ -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
)
f
ree
(
split_str
);
if
(
split_str
)
F
ree
(
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
.
0
f
)
{
cdoWarning
(
" RGB Colour specified with Improper values!"
);
Free
(
split_str
);
Free
(
split_str
);
return
1
;
}
f
ree
(
split_str
);
F
ree
(
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
;
}
...
...
src/Magvector.c
View file @
427e6344
...
...
@@ -516,7 +516,7 @@ void VerifyVectorParameters( int num_param, char **param_names, int opID )
}
if
(
split_str
)
f
ree
(
split_str
);
F
ree
(
split_str
);
}
if
(
halt_flag
==
TRUE
)
...
...
src/Maskbox.c
View file @
427e6344
...
...
@@ -452,8 +452,8 @@ void *Maskbox(void *argument)
}
fclose
(
fp
);
}
if
(
xcoords
)
f
ree
(
xcoords
);
if
(
ycoords
)
f
ree
(
ycoords
);
if
(
xcoords
)
F
ree
(
xcoords
);
if
(
ycoords
)
F
ree
(
ycoords
);
}
int
tsID
=
0
;
...
...
src/Seaspctl.c
View file @
427e6344
...
...
@@ -234,7 +234,7 @@ void *Seaspctl(void *argument)
{
nlevels
=
zaxisInqSize
(
vlistInqVarZaxis
(
vlistID1
,
varID
));
for
(
levelID
=
0
;
levelID
<
nlevels
;
levelID
++
)
f
ree
(
vars1
[
varID
][
levelID
].
ptr
);
F
ree
(
vars1
[
varID
][
levelID
].
ptr
);
Free
(
vars1
[
varID
]);
}
...
...
src/Ydayarith.c
View file @
427e6344
...
...
@@ -176,8 +176,8 @@ void *Ydayarith(void *argument)
Free
(
varnmiss2
[
day
][
varID
]);
}
f
ree
(
vardata2
[
day
]);
f
ree
(
varnmiss2
[
day
]);
F
ree
(
vardata2
[
day
]);
F
ree
(
varnmiss2
[
day
]);
}
if
(
field1
.
ptr
)
Free
(
field1
.
ptr
);
...
...
src/Yhourarith.c
View file @
427e6344
...
...
@@ -201,8 +201,8 @@ void *Yhourarith(void *argument)
Free
(
varnmiss2
[
houroy
][
varID
]);
}
f
ree
(
vardata2
[
houroy
]);
f
ree
(
varnmiss2
[
houroy
]);
F
ree
(
vardata2
[
houroy
]);
F
ree
(
varnmiss2
[
houroy
]);
}
if
(
field1
.
ptr
)
Free
(
field1
.
ptr
);
...
...
src/Ymonarith.c
View file @
427e6344
...
...
@@ -202,8 +202,8 @@ void *Ymonarith(void *argument)
Free
(
varnmiss2
[
mon
][
varID
]);
}
f
ree
(
vardata2
[
mon
]);
f
ree
(
varnmiss2
[
mon
]);
F
ree
(
vardata2
[
mon
]);
F
ree
(
varnmiss2
[
mon
]);
}
if
(
field1
.
ptr
)
Free
(
field1
.
ptr
);
...
...
src/afterburnerlib.c
View file @
427e6344
...
...
@@ -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
)
f
ree
(
trig
);
if
(
trig
)
F
ree
(
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
)
f
ree
(
trig
);
if
(
trig
)
F
ree
(
trig
);
trig
=
(
double
*
)
Malloc
(
nlon
*
sizeof
(
double
));
fft_set
(
trig
,
ifax
,
nlon
);
}
...
...
src/grid.c
View file @
427e6344
...
...
@@ -1309,8 +1309,8 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXvals
(
gridID2
,
xvals2D
);
gridDefYvals
(
gridID2
,
yvals2D
);
f
ree
(
xvals2D
);
f
ree
(
yvals2D
);
F
ree
(
xvals2D
);
F
ree
(
yvals2D
);
if
(
lbounds
)
{
...
...
@@ -1358,15 +1358,15 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXbounds
(
gridID2
,
xbounds2D
);
gridDefYbounds
(
gridID2
,
ybounds2D
);
f
ree
(
xbounds
);
f
ree
(
ybounds
);
f
ree
(
xbounds2D
);
f
ree
(
ybounds2D
);
F
ree
(
xbounds
);
F
ree
(
ybounds
);
F
ree
(
xbounds2D
);
F
ree
(
ybounds2D
);
}
}
f
ree
(
xvals
);
f
ree
(
yvals
);
F
ree
(
xvals
);
F
ree
(
yvals
);
gridCopyMask
(
gridID1
,
gridID2
,
gridsize
);
...
...
@@ -1439,11 +1439,11 @@ int gridToUnstructured(int gridID1, int lbounds)
gridDefXunits
(
gridID2
,
"degrees_east"
);
gridDefYunits
(
gridID2
,
"degrees_north"
);
f
ree
(
imask
);
f
ree
(
xvals
);
f
ree
(
yvals
);
if
(
xbounds
)
f
ree
(
xbounds
);
if
(
ybounds
)
f
ree
(
ybounds
);
F
ree
(
imask
);
F
ree
(
xvals
);
F
ree
(
yvals
);
if
(
xbounds
)
F
ree
(
xbounds
);
if
(
ybounds
)
F
ree
(
ybounds
);
gridCopyMask
(
gridID1
,
gridID2
,
gridsize
);
...
...
src/hetaeta.c
View file @
427e6344
...
...
@@ -839,7 +839,7 @@ void hetaeta(int ltq, int ngp, const int *imiss,
if
(
nvars
>
0
)
{
for
(
iv
=
0
;
iv
<
nvars
;
++
iv
)
f
ree
(
vars_pbl
[
iv
]);
F
ree
(
vars_pbl
[
iv
]);
Free
(
vars_pbl
);
}
...
...
src/magics_template_parser.c
View file @
427e6344
...
...
@@ -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
);
f
ree
(
float_param_list
);
f
ree
(
split_str
);
F
ree
(
float_param_list
);
F
ree
(
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
);
f
ree
(
int_param_list
);
f
ree
(
split_str
);
F
ree
(
int_param_list
);
F
ree
(
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
);
f
ree
(
split_str
);
F
ree
(
split_str
);
}
else
{
...
...
src/statistic.c
View file @
427e6344
...
...
@@ -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
);
f
ree
(
e
);
F
ree
(
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
);
f
ree
(
index
);
F
ree
(
index
);
return
not_singular
;
}
...
...
@@ -377,8 +377,8 @@ int inverse_of_matrix (double **a, double **b, int n)
}
}
f
ree
(
index
);
f
ree
(
col
);
F
ree
(
index
);
F
ree
(
col
);
return
not_singular
;
}
...
...
@@ -448,7 +448,7 @@ int lu_decomposition (double **a, int n, int *index, int *sign)
}
}
f
ree
(
v
);
F
ree
(
v
);
return
1
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment