Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
4674b4a7
Commit
4674b4a7
authored
May 30, 2016
by
Hisham
Browse files
Stricter strdup.
parent
7ededce9
Changes
1
Hide whitespace changes
Inline
Side-by-side
XAlloc.c
View file @
4674b4a7
...
...
@@ -44,8 +44,11 @@ void* xRealloc(void* ptr, size_t size) {
}
char
*
xStrdup
(
const
char
*
str
)
{
if
(
!
str
)
{
fail
();
}
char
*
data
=
strdup
(
str
);
if
(
!
data
&&
str
)
{
if
(
!
data
)
{
fail
();
}
return
data
;
...
...
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