You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
1.0 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memdup.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: emartine <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/09 18:29:37 by emartine #+# #+# */
/* Updated: 2017/11/09 18:29:39 by emartine ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memdup(const void *src, size_t len)
{
char *r;
if (!(r = (char *)malloc(len)))
return (NULL);
return (ft_memcpy(r, src, len));
}