diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-22 09:13:02 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-22 09:13:02 +0000 |
commit | b39031cd770c8736463a022baf22e8f90a42eb5b (patch) | |
tree | 09fe6dea6e4ca5a6bd82d442643282d1e7d3fb71 /examples | |
parent | 459dc315b11d20f933c19c782338a8e7bd8ad8b2 (diff) | |
download | mailutils-b39031cd770c8736463a022baf22e8f90a42eb5b.tar.gz mailutils-b39031cd770c8736463a022baf22e8f90a42eb5b.tar.bz2 |
Bugfix
Diffstat (limited to 'examples')
-rw-r--r-- | examples/listop.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/listop.c b/examples/listop.c index 5b034d9ec..c131c98ed 100644 --- a/examples/listop.c +++ b/examples/listop.c @@ -253,6 +253,7 @@ shell (mu_list_t list) mu_iterator_t itr[NITR]; int rc; + memset (&itr, 0, sizeof itr); num = 0; while (1) { @@ -260,6 +261,14 @@ shell (mu_list_t list) char buf[80]; int argc; char **argv; + + if (!itr[num]) + { + rc = mu_list_get_iterator (list, &itr[num]); + if (rc) + lperror ("mu_list_get_iterator", rc); + mu_iterator_first (itr[num]); + } rc = mu_iterator_current (itr[num], (void**) &text); if (rc) |