blob: d59fa2645e7fb8c580d363a7208918d4fa01d44f [file] [log] [blame]
Antonio Nino Diaz9eddb1e2018-08-16 14:53:05 +01001/*
Govindraj Rajaeee28e72023-08-01 15:52:40 -05002 * Copyright (c) 2013-2019, Arm Limited and Contributors. All rights reserved.
Antonio Nino Diaz9eddb1e2018-08-16 14:53:05 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <stddef.h>
Ambroise Vincentb237bca2019-02-13 15:58:00 +00008#include <string.h>
Antonio Nino Diaz9eddb1e2018-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 Bollapalli2f6ce732024-04-25 12:17:01 +053015 while (len--) {
Antonio Nino Diaz9eddb1e2018-08-16 14:53:05 +010016 *d++ = *s++;
Maheedhar Bollapalli2f6ce732024-04-25 12:17:01 +053017 }
Antonio Nino Diaz9eddb1e2018-08-16 14:53:05 +010018
19 return dst;
20}