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
971ebd4d
Commit
971ebd4d
authored
Oct 13, 2015
by
Uwe Schulzweida
Browse files
remap_vars_init: replace Realloc by Malloc
parent
562a1d39
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/remaplib.c
View file @
971ebd4d
...
...
@@ -773,7 +773,7 @@ static
void
cell_bounding_boxes
(
remapgrid_t
*
grid
,
int
remap_grid_basis
)
{
if
(
remap_grid_basis
==
REMAP_GRID_BASIS_SRC
||
grid
->
luse_cell_corners
)
grid
->
cell_bound_box
=
(
restr_t
*
)
Re
alloc
(
grid
->
cell_bound_box
,
4
*
grid
->
size
*
sizeof
(
restr_t
));
grid
->
cell_bound_box
=
(
restr_t
*
)
M
alloc
(
4
*
grid
->
size
*
sizeof
(
restr_t
));
if
(
grid
->
luse_cell_corners
)
{
...
...
@@ -1015,10 +1015,10 @@ void remap_vars_init(int map_type, long src_grid_size, long tgt_grid_size, remap
/* Allocate address and weight arrays for mapping 1 */
if
(
map_type
==
MAP_TYPE_CONSERV
)
{
rv
->
src_cell_add
=
(
int
*
)
Re
alloc
(
rv
->
src_cell_add
,
rv
->
max_links
*
sizeof
(
int
));
rv
->
tgt_cell_add
=
(
int
*
)
Re
alloc
(
rv
->
tgt_cell_add
,
rv
->
max_links
*
sizeof
(
int
));
rv
->
src_cell_add
=
(
int
*
)
M
alloc
(
rv
->
max_links
*
sizeof
(
int
));
rv
->
tgt_cell_add
=
(
int
*
)
M
alloc
(
rv
->
max_links
*
sizeof
(
int
));
rv
->
wts
=
(
double
*
)
Re
alloc
(
rv
->
wts
,
rv
->
num_wts
*
rv
->
max_links
*
sizeof
(
double
));
rv
->
wts
=
(
double
*
)
M
alloc
(
rv
->
num_wts
*
rv
->
max_links
*
sizeof
(
double
));
}
rv
->
links
.
option
=
FALSE
;
...
...
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