From 7a66106846bc312a0ba74ca0ef01b2e9d4226340 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/hts221: do normal assignment instead of memcpy --- drivers/hts221/hts221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hts221/hts221.c b/drivers/hts221/hts221.c index 7ff9b79670..a22e057ba9 100644 --- a/drivers/hts221/hts221.c +++ b/drivers/hts221/hts221.c @@ -147,7 +147,7 @@ int hts221_init(hts221_t *dev, const hts221_params_t *params) { uint8_t reg; - memcpy(&dev->p, params, sizeof(hts221_params_t)); + dev->p = *params; i2c_acquire(BUS); /* try if we can interact with the device by reading its manufacturer ID */ -- GitLab