Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
f5774a21
Commit
f5774a21
authored
Aug 28, 2015
by
Oliver Heidmann
Browse files
replaced all xrealloc with realloc in tests
parent
41ab38ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
tests/deco2d_model.c
View file @
f5774a21
...
...
@@ -333,7 +333,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
/
(
size_t
)
nproma
)
*
(
size_t
)
nproma
*
varLevs
;
if
(
varslice_size
<
chunkSize
)
{
varslice
=
(
double
*
)
x
realloc
(
varslice
,
chunkSize
*
sizeof
(
var
[
0
]));
varslice
=
(
double
*
)
realloc
(
varslice
,
chunkSize
*
sizeof
(
var
[
0
]));
varslice_size
=
chunkSize
;
}
modelRegionCompute
(
varslice
,
(
int
)
varLevs
,
nlat
,
nlon
,
...
...
tests/simple_model.c
View file @
f5774a21
...
...
@@ -250,7 +250,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
#endif
if
(
varslice_size
<
(
size_t
)
chunk
)
{
varslice
=
(
double
*
)
x
realloc
(
varslice
,
(
size_t
)
chunk
*
sizeof
(
var
[
0
]));
varslice
=
(
double
*
)
realloc
(
varslice
,
(
size_t
)
chunk
*
sizeof
(
var
[
0
]));
varslice_size
=
(
size_t
)
chunk
;
}
modelRegionCompute
(
varslice
,
(
size_t
)
start
,
(
size_t
)
chunk
,
...
...
tests/simple_model_helper.c
View file @
f5774a21
...
...
@@ -107,7 +107,7 @@ int
PPM_prime_factorization_32
(
uint32_t
n
,
uint32_t
**
factors
)
{
if
(
n
<=
1
)
return
0
;
uint32_t
*
restrict
pfactors
=
x
realloc
(
*
factors
,
32
*
sizeof
(
pfactors
[
0
]));
uint32_t
*
restrict
pfactors
=
realloc
(
*
factors
,
32
*
sizeof
(
pfactors
[
0
]));
size_t
numFactors
=
0
;
uint32_t
unfactored
=
n
;
while
(
!
(
unfactored
&
1
))
...
...
tests/test_grib.c
View file @
f5774a21
...
...
@@ -86,7 +86,7 @@ int main()
if
(
gridsize
*
nlevel
>
datasize
)
datasize
=
gridsize
*
nlevel
;
}
data
=
(
double
*
)
x
realloc
(
data
,
datasize
*
sizeof
(
double
));
data
=
(
double
*
)
realloc
(
data
,
datasize
*
sizeof
(
double
));
memset
(
data
,
0
,
datasize
*
sizeof
(
double
));
taxisID
=
vlistInqTaxis
(
vlistID
);
...
...
Write
Preview
Markdown
is supported
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