summaryrefslogtreecommitdiff
path: root/src/caches
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-11-25 13:21:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-11-25 13:21:38 +0000
commit2a9ec169562d289667ec485a090ecc33f72c5e2f (patch)
tree291838fabe4cde59ab15e64147948f1c6a02bf60 /src/caches
parent88d066b341a6be9aa25e77fd8fac1b11a4243ef9 (diff)
downloads6-dns-2a9ec169562d289667ec485a090ecc33f72c5e2f.tar.xz
Don't rely on type autopromotion
Diffstat (limited to 'src/caches')
-rw-r--r--src/caches/dcache_add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/caches/dcache_add.c b/src/caches/dcache_add.c
index a534f7a..bbe5fea 100644
--- a/src/caches/dcache_add.c
+++ b/src/caches/dcache_add.c
@@ -80,7 +80,7 @@ static inline int dcache_add_node (dcache_t *z, dcache_node_t const *node)
static inline int dcache_add_unbounded (dcache_t *z, char const *key, uint16_t keylen, char const *data, uint16_t datalen, tain_t const *expire, tain_t const *stamp)
{
- uint32_t len = keylen + datalen ;
+ uint32_t len = (uint32_t)keylen + (uint32_t)datalen ;
dcache_node_t y = { .key = { .s = alloc(len) } } ;
if (!y.key.s) return 0 ;
memcpy(y.key.s, key, keylen) ;