Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-2-2
Commits
aa1868c7
Commit
aa1868c7
authored
Jul 22, 2013
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sizeof mismatch (fix many cids)
parent
4658c81d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/vlc_arrays.h
include/vlc_arrays.h
+5
-5
No files found.
include/vlc_arrays.h
View file @
aa1868c7
...
...
@@ -92,9 +92,9 @@ static inline void *realloc_down( void *ptr, size_t size )
#define TAB_APPEND_CAST( cast, count, tab, p ) \
do { \
if( (count) > 0 ) \
(tab) = cast realloc( tab, sizeof(
void **
) * ( (count) + 1 ) ); \
(tab) = cast realloc( tab, sizeof(
*(tab)
) * ( (count) + 1 ) ); \
else \
(tab) = cast malloc( sizeof(
void **
) ); \
(tab) = cast malloc( sizeof(
*(tab)
) ); \
if( !(tab) ) abort(); \
(tab)[count] = (p); \
(count)++; \
...
...
@@ -123,7 +123,7 @@ static inline void *realloc_down( void *ptr, size_t size )
{ \
memmove( ((void**)(tab) + i_index), \
((void**)(tab) + i_index+1), \
( (count) - i_index - 1 ) * sizeof(
void*
) );\
( (count) - i_index - 1 ) * sizeof(
*(tab)
) );\
} \
(count)--; \
if( (count) == 0 ) \
...
...
@@ -136,9 +136,9 @@ static inline void *realloc_down( void *ptr, size_t size )
#define TAB_INSERT_CAST( cast, count, tab, p, index ) do { \
if( (count) > 0 ) \
(tab) = cast realloc( tab, sizeof(
void **
) * ( (count) + 1 ) ); \
(tab) = cast realloc( tab, sizeof(
*(tab)
) * ( (count) + 1 ) ); \
else \
(tab) = cast malloc( sizeof(
void **
) ); \
(tab) = cast malloc( sizeof(
*(tab)
) ); \
if( !(tab) ) abort(); \
if( (count) - (index) > 0 ) \
memmove( (void**)(tab) + (index) + 1, \
...
...
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