From 0cceb64ae95cd64905fdf9f83d69d7ec1e2e3c99 Mon Sep 17 00:00:00 2001 From: Kees Bakker <kees@sodaq.com> Date: Sun, 6 Jan 2019 22:54:44 +0100 Subject: [PATCH] drivers/tmp006: do normal assignment instead of memcpy --- drivers/tmp006/tmp006.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tmp006/tmp006.c b/drivers/tmp006/tmp006.c index 03171541ff..350cd2c574 100644 --- a/drivers/tmp006/tmp006.c +++ b/drivers/tmp006/tmp006.c @@ -70,7 +70,7 @@ int tmp006_init(tmp006_t *dev, const tmp006_params_t *params) uint16_t tmp; /* initialize the device descriptor */ - memcpy(&dev->p, params, sizeof(tmp006_params_t)); + dev->p = *params; if (dev->p.rate > TMP006_CONFIG_CR_AS16) { LOG_ERROR("tmp006_init: invalid conversion rate!\n"); -- GitLab