Build fix: ParameterWeb had its own (static) version of strndup which broke the build on gcc4. Removed it so as to just use the library version added recently instead.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28946 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2009-01-19 01:38:30 +00:00
parent c8a2b8db37
commit f3fd1519ac
-21
View File
@@ -297,27 +297,6 @@ size_left(ssize_t size, const void *bufferStart, const void *buffer)
* The buffer returned is to be freed by the caller using free().
*/
static char *
strndup(const char *source, size_t maxBufferSize)
{
if (source == NULL || source[0] == '\0')
return NULL;
uint32 size = strlen(source) + 1;
if (size > maxBufferSize)
size = maxBufferSize;
char *target = (char *)malloc(size);
if (target == NULL)
return NULL;
memcpy(target, source, size - 1);
target[size - 1] = '\0';
return target;
}
// #pragma mark -
/*************************************************************