POSIX strdup() is not required to handle a NULL argument gracefully (and
it doesn't under Linux), on BeOS it has to, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20872 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
17d0be4cad
commit
4fc054f504
@ -219,6 +219,8 @@ fssh_strcasestr(const char *string, const char *searchString)
|
||||
char*
|
||||
fssh_strdup(const char *string)
|
||||
{
|
||||
if (!string)
|
||||
return NULL;
|
||||
return strdup(string);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user