19 const std::size_t n = (std::min)(
static_cast<std::size_t
>(c.dlc),
sizeof(c.data));
20 m.id =
static_cast<hf_u32_t
>(c.id);
21 m.dlc =
static_cast<hf_u8_t
>(n);
22 m.is_extended = c.extended;
25 (void)std::memcpy(m.data, c.data, n);
26 if (n <
sizeof(m.data)) {
27 (void)std::memset(m.data + n, 0,
sizeof(m.data) - n);
34 c.extended = m.is_extended;
36 const std::size_t n = (std::min)(
static_cast<std::size_t
>(m.dlc),
sizeof(c.data));
37 (void)std::memcpy(c.data, m.data, n);
38 if (n <
sizeof(c.data)) {
39 (void)std::memset(c.data + n, 0,
sizeof(c.data) - n);