summaryrefslogtreecommitdiff
path: root/src/libdatastruct/gensetdyn_iter_withcancel.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-10 22:46:45 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-10 22:46:45 +0000
commitded707de84a7b1f36a395299ff945c2b2e069bff (patch)
treee112417452906b085fd991910c261a002536fd58 /src/libdatastruct/gensetdyn_iter_withcancel.c
parentb7c6bde2b64dcea4e6d272b11dd111b704309f93 (diff)
downloadskalibs-ded707de84a7b1f36a395299ff945c2b2e069bff.tar.xz
Gnfrlbl... gensetdyn_iter is an unsigned int again, but the value
is now tested against gensetdyn_n(g). It's cleaner, I swear.
Diffstat (limited to 'src/libdatastruct/gensetdyn_iter_withcancel.c')
-rw-r--r--src/libdatastruct/gensetdyn_iter_withcancel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libdatastruct/gensetdyn_iter_withcancel.c b/src/libdatastruct/gensetdyn_iter_withcancel.c
index c524b1c..8dc2a18 100644
--- a/src/libdatastruct/gensetdyn_iter_withcancel.c
+++ b/src/libdatastruct/gensetdyn_iter_withcancel.c
@@ -6,8 +6,8 @@
int gensetdyn_iter_withcancel (gensetdyn *g, iterfunc_t_ref f, iterfunc_t_ref cancelf, void *stuff)
{
- unsigned int n = gensetdyn_iter_nocancel(g, g->storage.len, f, stuff) ;
- if (n < g->storage.len)
+ unsigned int n = gensetdyn_iter_nocancel(g, gensetdyn_n(g), f, stuff) ;
+ if (n < gensetdyn_n(g))
{
int e = errno ;
gensetdyn_iter_nocancel(g, n, cancelf, stuff) ;