Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
07d9c6a3
Commit
07d9c6a3
authored
Oct 30, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast malloc() to type
parent
6bd69d6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
openair2/UTIL/LISTS/list.h
openair2/UTIL/LISTS/list.h
+2
-2
No files found.
openair2/UTIL/LISTS/list.h
View file @
07d9c6a3
...
...
@@ -114,7 +114,7 @@ typedef struct {
}
varArray_t
;
static
inline
varArray_t
*
initVarArray
(
size_t
increment
,
size_t
atomSize
)
{
varArray_t
*
tmp
=
malloc
(
sizeof
(
varArray_t
)
+
increment
*
atomSize
);
varArray_t
*
tmp
=
(
varArray_t
*
)
malloc
(
sizeof
(
varArray_t
)
+
increment
*
atomSize
);
tmp
->
size
=
0
;
tmp
->
atomSize
=
atomSize
;
tmp
->
mallocedSize
=
increment
;
...
...
@@ -129,7 +129,7 @@ static inline void * dataArray(varArray_t * input) {
static
inline
void
appendVarArray
(
varArray_t
*
input
,
void
*
data
)
{
if
(
input
->
size
>=
input
->
mallocedSize
)
{
input
->
mallocedSize
+=
input
->
increment
;
input
=
realloc
(
input
,
sizeof
(
varArray_t
)
+
input
->
mallocedSize
*
input
->
atomSize
);
input
=
(
varArray_t
*
)
realloc
(
input
,
sizeof
(
varArray_t
)
+
input
->
mallocedSize
*
input
->
atomSize
);
}
memcpy
((
uint8_t
*
)(
input
+
1
)
+
input
->
atomSize
*
input
->
size
++
,
data
,
input
->
atomSize
);
}
...
...
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