Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
5307de13
Commit
5307de13
authored
Sep 22, 2014
by
Thomas Jahns
🤸
Browse files
Fix implicit conversions in iegScanTimestep(1).
parent
6994a6ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_ieg.c
View file @
5307de13
...
...
@@ -902,10 +902,11 @@ void iegScanTimestep1(stream_t *streamptr)
{
streamptr
->
tsteps
[
0
].
recordSize
=
nrecords
;
streamptr
->
tsteps
[
0
].
records
=
(
record_t
*
)
realloc
(
streamptr
->
tsteps
[
0
].
records
,
nrecords
*
sizeof
(
record_t
));
(
record_t
*
)
xrealloc
(
streamptr
->
tsteps
[
0
].
records
,
(
size_t
)
nrecords
*
sizeof
(
record_t
));
}
streamptr
->
tsteps
[
0
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
streamptr
->
tsteps
[
0
].
recIDs
=
(
int
*
)
x
malloc
(
(
size_t
)
nrecords
*
sizeof
(
int
));
streamptr
->
tsteps
[
0
].
nrecs
=
nrecords
;
for
(
recID
=
0
;
recID
<
nrecords
;
recID
++
)
streamptr
->
tsteps
[
0
].
recIDs
[
recID
]
=
recID
;
...
...
@@ -968,7 +969,7 @@ int iegScanTimestep2(stream_t *streamptr)
cdi_create_records
(
streamptr
,
tsID
);
nrecords
=
streamptr
->
tsteps
[
0
].
nallrecs
;
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
malloc
(
nrecords
*
sizeof
(
int
));
streamptr
->
tsteps
[
1
].
recIDs
=
(
int
*
)
x
malloc
(
(
size_t
)
nrecords
*
sizeof
(
int
));
streamptr
->
tsteps
[
1
].
nrecs
=
0
;
for
(
recID
=
0
;
recID
<
nrecords
;
recID
++
)
streamptr
->
tsteps
[
1
].
recIDs
[
recID
]
=
-
1
;
...
...
@@ -1152,7 +1153,8 @@ long iegScanTimestep(stream_t *streamptr)
nrecs
=
streamptr
->
tsteps
[
1
].
nrecs
;
streamptr
->
tsteps
[
tsID
].
nrecs
=
nrecs
;
streamptr
->
tsteps
[
tsID
].
recIDs
=
(
int
*
)
malloc
(
nrecs
*
sizeof
(
int
));
streamptr
->
tsteps
[
tsID
].
recIDs
=
(
int
*
)
xmalloc
((
size_t
)
nrecs
*
sizeof
(
int
));
for
(
recID
=
0
;
recID
<
nrecs
;
recID
++
)
streamptr
->
tsteps
[
tsID
].
recIDs
[
recID
]
=
streamptr
->
tsteps
[
1
].
recIDs
[
recID
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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