From 4fc054f504516a1ca318a3460c7022254d3afae4 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 27 Apr 2007 22:26:04 +0000 Subject: [PATCH] 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 --- src/tools/fs_shell/string.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/fs_shell/string.cpp b/src/tools/fs_shell/string.cpp index 3ecb73c1d9..da431d65cc 100644 --- a/src/tools/fs_shell/string.cpp +++ b/src/tools/fs_shell/string.cpp @@ -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); }