diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-06-13 22:19:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-06-13 22:19:05 +0000 |
commit | 193a7be520502f24e995b71768dd89c37b3776eb (patch) | |
tree | 29a1d10e1e74220c9d0d463bbcb03aa7c1954583 /src/libdatastruct | |
parent | 8fac1ec21fc54a050822258d8873b9a87a2bd2fe (diff) | |
download | skalibs-193a7be520502f24e995b71768dd89c37b3776eb.tar.xz |
Fix iter_func type; add tain_earliest
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libdatastruct')
-rw-r--r-- | src/libdatastruct/genset_deepfree.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/genset_iter_nocancel.c | 2 | ||||
-rw-r--r-- | src/libdatastruct/genset_iter_withcancel.c | 1 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_deepfree.c | 4 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_iter_nocancel.c (renamed from src/libdatastruct/gensetdyn_iter.c) | 4 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_iter_withcancel.c | 1 |
6 files changed, 11 insertions, 5 deletions
diff --git a/src/libdatastruct/genset_deepfree.c b/src/libdatastruct/genset_deepfree.c index c58a5f9..7b4a728 100644 --- a/src/libdatastruct/genset_deepfree.c +++ b/src/libdatastruct/genset_deepfree.c @@ -3,10 +3,10 @@ #include <skalibs/functypes.h> #include <skalibs/genset.h> -static int freeiter (char *s, void *aux) +static int freeiter (void *s, void *aux) { free_func_ref f = aux ; - (*f)((void *)s) ; + (*f)(s) ; return 1 ; } diff --git a/src/libdatastruct/genset_iter_nocancel.c b/src/libdatastruct/genset_iter_nocancel.c index 339f4b6..28da323 100644 --- a/src/libdatastruct/genset_iter_nocancel.c +++ b/src/libdatastruct/genset_iter_nocancel.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include <stdint.h> + #include <skalibs/bitarray.h> #include <skalibs/genset.h> diff --git a/src/libdatastruct/genset_iter_withcancel.c b/src/libdatastruct/genset_iter_withcancel.c index 1220dbc..6b70c68 100644 --- a/src/libdatastruct/genset_iter_withcancel.c +++ b/src/libdatastruct/genset_iter_withcancel.c @@ -2,6 +2,7 @@ #include <stdint.h> #include <errno.h> + #include <skalibs/genset.h> int genset_iter_withcancel (genset *g, iter_func_ref f, iter_func_ref cancelf, void *stuff) diff --git a/src/libdatastruct/gensetdyn_deepfree.c b/src/libdatastruct/gensetdyn_deepfree.c index 2b0c87c..623120f 100644 --- a/src/libdatastruct/gensetdyn_deepfree.c +++ b/src/libdatastruct/gensetdyn_deepfree.c @@ -3,10 +3,10 @@ #include <skalibs/functypes.h> #include <skalibs/gensetdyn.h> -static int freeiter (char *s, void *aux) +static int freeiter (void *s, void *aux) { free_func_ref f = aux ; - (*f)((void *)s) ; + (*f)(s) ; return 1 ; } diff --git a/src/libdatastruct/gensetdyn_iter.c b/src/libdatastruct/gensetdyn_iter_nocancel.c index 8470adf..a06b6b5 100644 --- a/src/libdatastruct/gensetdyn_iter.c +++ b/src/libdatastruct/gensetdyn_iter_nocancel.c @@ -1,6 +1,8 @@ /* ISC license. */ -#include <sys/types.h> +#include <stddef.h> +#include <stdint.h> + #include <skalibs/bitarray.h> #include <skalibs/gensetdyn.h> diff --git a/src/libdatastruct/gensetdyn_iter_withcancel.c b/src/libdatastruct/gensetdyn_iter_withcancel.c index 0a250ce..b883e58 100644 --- a/src/libdatastruct/gensetdyn_iter_withcancel.c +++ b/src/libdatastruct/gensetdyn_iter_withcancel.c @@ -2,6 +2,7 @@ #include <stdint.h> #include <errno.h> + #include <skalibs/gensetdyn.h> int gensetdyn_iter_withcancel (gensetdyn *g, iter_func_ref f, iter_func_ref cancelf, void *stuff) |