diff options
-rw-r--r-- | src/include/skalibs/gensetdyn.h | 2 | ||||
-rw-r--r-- | src/libdatastruct/gensetdyn_iter_withcancel.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/skalibs/gensetdyn.h b/src/include/skalibs/gensetdyn.h index 7a1cc47..7cb8f1a 100644 --- a/src/include/skalibs/gensetdyn.h +++ b/src/include/skalibs/gensetdyn.h @@ -36,7 +36,7 @@ extern int gensetdyn_delete (gensetdyn *, unsigned int) ; #define GENSETDYN_P(type, g, i) ((type *)gensetdyn_p(g, i)) extern unsigned int gensetdyn_iter_nocancel (gensetdyn *, unsigned int, iterfunc_t_ref, void *) ; -#define gensetdyn_iter(g, f, stuff) gensetdyn_iter_nocancel(g, (g)->storage.len, f, stuff) +#define gensetdyn_iter(g, f, stuff) (gensetdyn_iter_nocancel(g, (g)->storage.len, f, stuff) == (g)->storage.len) extern int gensetdyn_iter_withcancel (gensetdyn *, iterfunc_t_ref, iterfunc_t_ref, void *) ; #endif diff --git a/src/libdatastruct/gensetdyn_iter_withcancel.c b/src/libdatastruct/gensetdyn_iter_withcancel.c index ffac1e0..c524b1c 100644 --- a/src/libdatastruct/gensetdyn_iter_withcancel.c +++ b/src/libdatastruct/gensetdyn_iter_withcancel.c @@ -6,7 +6,7 @@ int gensetdyn_iter_withcancel (gensetdyn *g, iterfunc_t_ref f, iterfunc_t_ref cancelf, void *stuff) { - unsigned int n = gensetdyn_iter(g, f, stuff) ; + unsigned int n = gensetdyn_iter_nocancel(g, g->storage.len, f, stuff) ; if (n < g->storage.len) { int e = errno ; |