ObjFW  Diff

Differences From Artifact [05f8092242]:

To Artifact [0fd9e55556]:


417
418
419
420
421
422
423
424
425
426
427
428
429
430

static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);

	if ((copy = malloc(length + 1)) == NULL)
		return NULL;

	memcpy(copy, string, length + 1);

	return copy;
}







|






417
418
419
420
421
422
423
424
425
426
427
428
429
430

static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);

	if ((copy = (char*)malloc(length + 1)) == NULL)
		return NULL;

	memcpy(copy, string, length + 1);

	return copy;
}