diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-08-04 11:24:03 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-08-04 11:24:03 +0000 |
commit | 29f70f35a48241eef0a690a00d5211f487972cba (patch) | |
tree | 7153e8f6623aed91a7d98a4961730bd161ac8a1a /src/caches/dcache_add.c | |
parent | ffed76f91e3623f40d1ebffffc0bc728722c84f5 (diff) | |
download | s6-dns-29f70f35a48241eef0a690a00d5211f487972cba.tar.xz |
Adapt to skalibs-2.11
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/caches/dcache_add.c')
-rw-r--r-- | src/caches/dcache_add.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/caches/dcache_add.c b/src/caches/dcache_add.c index b69b1ca..650f51b 100644 --- a/src/caches/dcache_add.c +++ b/src/caches/dcache_add.c @@ -14,9 +14,9 @@ #include <s6-dns/dcache.h> #include "dcache-internal.h" -static void uniquify (avltree const *tree, tain_t *stamp) +static void uniquify (avltree const *tree, tain *stamp) { - static tain_t const nano = { .sec = TAI_ZERO, .nano = 1 } ; + static tain const nano = { .sec = TAI_ZERO, .nano = 1 } ; uint32_t dummy ; while (avltree_search(tree, stamp, &dummy)) tain_add(stamp, stamp, &nano) ; @@ -54,7 +54,7 @@ static inline int dcache_add_node (dcache_t *z, dcache_node_t const *node) return 0 ; } -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) +static inline int dcache_add_unbounded (dcache_t *z, char const *key, uint16_t keylen, char const *data, uint16_t datalen, tain const *expire, tain const *stamp) { uint32_t len = (uint32_t)keylen + (uint32_t)datalen ; dcache_node_t y = { .key = { .s = alloc(len) } } ; @@ -76,7 +76,7 @@ static inline int dcache_add_unbounded (dcache_t *z, char const *key, uint16_t k } -int dcache_add (dcache_t *z, uint64_t max, char const *key, uint16_t keylen, char const *data, uint16_t datalen, tain_t const *expire, tain_t const *stamp) +int dcache_add (dcache_t *z, uint64_t max, char const *key, uint16_t keylen, char const *data, uint16_t datalen, tain const *expire, tain const *stamp) { uint64_t size = DCACHE_NODE_OVERHEAD + keylen + datalen ; if (size > max) return (errno = EINVAL, 0) ; |