aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/utils.h
blob: 11ec7400690c8599c6dcdf228cdc99b215a08773 (plain)
1
2
3
4
5
6
7
8
9
10
11
#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);