summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-01-22 09:13:02 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-01-22 09:13:02 +0000
commitb39031cd770c8736463a022baf22e8f90a42eb5b (patch)
tree09fe6dea6e4ca5a6bd82d442643282d1e7d3fb71 /examples
parent459dc315b11d20f933c19c782338a8e7bd8ad8b2 (diff)
downloadmailutils-b39031cd770c8736463a022baf22e8f90a42eb5b.tar.gz
mailutils-b39031cd770c8736463a022baf22e8f90a42eb5b.tar.bz2
Bugfix
Diffstat (limited to 'examples')
-rw-r--r--examples/listop.c9
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)

Return to:

Send suggestions and report system problems to the System administrator.