summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_memmove.c
blob: 000a2b77a6ec56eb8127bfa0b57059efd8c23df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/*                                                          LE - /            */
/*                                                              /             */
/*   ft_memmove.c                                     .::    .:/ .      .::   */
/*                                                 +:+:+   +:    +:  +:+:+    */
/*   By: rbousset <marvin@le-101.fr>                +:+   +:    +:    +:+     */
/*                                                 #+#   #+    #+    #+#      */
/*   Created: 2019/10/08 18:57:44 by rbousset     #+#   ##    ##    #+#       */
/*   Updated: 2019/10/13 08:38:47 by rbousset    ###    #+. /#+    ###.fr     */
/*                                                         /                  */
/*                                                        /                   */
/* ************************************************************************** */

#include "libft.h"
#include <stddef.h>

void
	*ft_memmove(void *dst, const void *src, size_t len)
{
	char	buff[len];

	if (src == NULL && dst == NULL && len != 0)
		return (NULL);
	ft_memcpy(buff, src, len);
	ft_memcpy(dst, buff, len);
	return (dst);
}