blob: b051f5e6c7571cad1b9ddd2af52fb230b04e3043 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// SPDX-License-Identifier: GPL-2.0-only
#include <stdint.h>
#include <string.h>
#pragma once
#define FW_MEMCPY_STR(dst, src) \
do { \
size_t slen = strlen(src); \
size_t dlen = sizeof(dst); \
memcpy(dst, src, slen > dlen ? dlen : slen); \
} while (0);
|