Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
12c6e1fa
Unverified
Commit
12c6e1fa
authored
Feb 20, 2019
by
Patrick Steinhardt
Committed by
GitHub
Feb 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4986 from lhchavez/realloc
Make stdalloc__reallocarray call stdalloc__realloc
parents
9f388e9f
6e0dfc6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/stdalloc.c
+3
-4
No files found.
src/stdalloc.c
View file @
12c6e1fa
...
...
@@ -88,11 +88,10 @@ static void *stdalloc__reallocarray(void *ptr, size_t nelem, size_t elsize, cons
{
size_t
newsize
;
GIT_UNUSED
(
file
);
GIT_UNUSED
(
line
)
;
if
(
GIT_MULTIPLY_SIZET_OVERFLOW
(
&
newsize
,
nelem
,
elsize
))
return
NULL
;
return
GIT_MULTIPLY_SIZET_OVERFLOW
(
&
newsize
,
nelem
,
elsize
)
?
NULL
:
realloc
(
ptr
,
newsize
);
return
stdalloc__realloc
(
ptr
,
newsize
,
file
,
line
);
}
static
void
*
stdalloc__mallocarray
(
size_t
nelem
,
size_t
elsize
,
const
char
*
file
,
int
line
)
...
...
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