blob: e8be154961dce861c0a13ab882d663847411e0a6 [file] [log] [blame]
Antonio Nino Diaz4661abc2018-08-16 14:53:05 +01001/*
Boyan Karatotev34d7f192025-03-17 10:31:03 +00002 * Copyright (c) 2013-2025, Arm Limited and Contributors. All rights reserved.
Antonio Nino Diaz4661abc2018-08-16 14:53:05 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <stddef.h>
Boyan Karatotev34d7f192025-03-17 10:31:03 +00008#include <string_private.h>
Antonio Nino Diaz4661abc2018-08-16 14:53:05 +01009
10void *memcpy(void *dst, const void *src, size_t len)
11{
12 const char *s = src;
13 char *d = dst;
14
Maheedhar Bollapalli60e5aee2024-04-25 12:17:01 +053015 while (len--) {
Antonio Nino Diaz4661abc2018-08-16 14:53:05 +010016 *d++ = *s++;
Maheedhar Bollapalli60e5aee2024-04-25 12:17:01 +053017 }
Antonio Nino Diaz4661abc2018-08-16 14:53:05 +010018
19 return dst;
20}