diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-10 22:46:45 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-10 22:46:45 +0000 |
commit | ded707de84a7b1f36a395299ff945c2b2e069bff (patch) | |
tree | e112417452906b085fd991910c261a002536fd58 /src/libdatastruct/gensetdyn_iter_withcancel.c | |
parent | b7c6bde2b64dcea4e6d272b11dd111b704309f93 (diff) | |
download | skalibs-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.c | 4 |
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) ; |