aboutsummaryrefslogtreecommitdiff
path: root/src/mem/ft_memmove.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-02 11:05:33 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-02 11:05:33 +0200
commit5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde (patch)
tree80911dc3c32e9f230750e7e1042d413dfb6efab2 /src/mem/ft_memmove.c
parentee32953ea79616e72f5428cdf40c834714a891c9 (diff)
parentb96b82194ccad2cddbb46b77aa1962a57c47ff44 (diff)
downloadlibft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.tar.gz
libft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.tar.bz2
libft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.zip
Merge branch 'master' into ft_ssl
Diffstat (limited to 'src/mem/ft_memmove.c')
-rw-r--r--src/mem/ft_memmove.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mem/ft_memmove.c b/src/mem/ft_memmove.c
index 2f794fd..142b761 100644
--- a/src/mem/ft_memmove.c
+++ b/src/mem/ft_memmove.c
@@ -11,11 +11,12 @@
/* ************************************************************************** */
#include "libft.h"
+#include "libft_mem.h"
void *ft_memmove(void *dst, const void *src, size_t len)
{
- long int *long_dst;
- const long int *long_src;
+ uint64_t *dst64;
+ const uint64_t *src64;
void *dst_copy;
if (dst >= src)
@@ -24,12 +25,12 @@ void *ft_memmove(void *dst, const void *src, size_t len)
while (len % 8 > 0)
{
len--;
- *(t_ftbyte*)dst++ = *(t_ftbyte*)src++;
+ *(uint8_t*)dst++ = *(uint8_t*)src++;
}
- long_dst = dst;
- long_src = src;
+ dst64 = dst;
+ src64 = src;
len /= 8;
while (len-- > 0)
- *long_dst++ = *long_src++;
+ *dst64++ = *src64++;
return (dst_copy);
}