From 355c52ac46123d12842f96bd044a9d23d0124cb4 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/dht: do normal assignment instead of memcpy

---
 drivers/dht/dht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dht/dht.c b/drivers/dht/dht.c
index 8b81a3ef7d..c27f3a78d1 100644
--- a/drivers/dht/dht.c
+++ b/drivers/dht/dht.c
@@ -69,7 +69,7 @@ int dht_init(dht_t *dev, const dht_params_t *params)
     assert(dev && params &&
            ((dev->type == DHT11) || (dev->type == DHT22) || (dev->type == DHT21)));
 
-    memcpy(dev, params, sizeof(dht_t));
+    *dev = *params;
 
     gpio_init(dev->pin, GPIO_OUT);
     gpio_set(dev->pin);
-- 
GitLab