summaryrefslogtreecommitdiff
path: root/src/caches
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-04 11:24:03 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-04 11:24:03 +0000
commit29f70f35a48241eef0a690a00d5211f487972cba (patch)
tree7153e8f6623aed91a7d98a4961730bd161ac8a1a /src/caches
parentffed76f91e3623f40d1ebffffc0bc728722c84f5 (diff)
downloads6-dns-29f70f35a48241eef0a690a00d5211f487972cba.tar.xz
Adapt to skalibs-2.11
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/caches')
-rw-r--r--src/caches/dcache_add.c8
-rw-r--r--src/caches/dcache_clean_expired.c2
-rw-r--r--src/caches/dcache_init.c4
-rw-r--r--src/caches/dcache_load.c4
-rw-r--r--src/caches/shibari_whitelist_read.c2
5 files changed, 10 insertions, 10 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) ;
diff --git a/src/caches/dcache_clean_expired.c b/src/caches/dcache_clean_expired.c
index 5308d8a..8a5b12c 100644
--- a/src/caches/dcache_clean_expired.c
+++ b/src/caches/dcache_clean_expired.c
@@ -8,7 +8,7 @@
#include <s6-dns/dcache.h>
#include "dcache-internal.h"
-void dcache_clean_expired (dcache_t *z, tain_t const *stamp)
+void dcache_clean_expired (dcache_t *z, tain const *stamp)
{
for (;;)
{
diff --git a/src/caches/dcache_init.c b/src/caches/dcache_init.c
index 93a069c..cc6c635 100644
--- a/src/caches/dcache_init.c
+++ b/src/caches/dcache_init.c
@@ -22,8 +22,8 @@ static int key_cmp (void const *a, void const *b, void *x)
static int tain_cmp (void const *a, void const *b, void *x)
{
- tain_t const *ta = a ;
- tain_t const *tb = b ;
+ tain const *ta = a ;
+ tain const *tb = b ;
(void)x ;
return tain_less(ta, tb) ? -1 : tain_less(tb, ta) ;
}
diff --git a/src/caches/dcache_load.c b/src/caches/dcache_load.c
index 8f9383f..71d38e0 100644
--- a/src/caches/dcache_load.c
+++ b/src/caches/dcache_load.c
@@ -15,8 +15,8 @@
static inline int dcache_load_node (dcache_t *z, uint64_t max, buffer *b)
{
- tain_t entry = { .nano = 0 } ;
- tain_t expire = { .nano = 0 } ;
+ tain entry = { .nano = 0 } ;
+ tain expire = { .nano = 0 } ;
uint16_t keylen ;
uint16_t datalen ;
char pack[TAI_PACK * 2 + 4] ;
diff --git a/src/caches/shibari_whitelist_read.c b/src/caches/shibari_whitelist_read.c
index 58dd2a0..48fcbcc 100644
--- a/src/caches/shibari_whitelist_read.c
+++ b/src/caches/shibari_whitelist_read.c
@@ -31,7 +31,7 @@ int shibari_whitelist_read (char const *path, genalloc *ip4, genalloc *ip6)
{
direntry *d ;
size_t pos ;
- ip46_t ip ;
+ ip46 ip ;
uint16_t mask ;
errno = 0 ;
d = readdir(dir) ;