Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
dfd35ead
...
dfd35ead5c95ccda4e11bfe185a77827092dac4e
authored
2003-08-28 21:54:46 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(util_run_events): Use iterator instead of
list_do. Iterators are safer.
1 parent
cb247618
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
imap4d/util.c
imap4d/util.c
View file @
dfd35ea
...
...
@@ -1254,10 +1254,19 @@ util_run_events (int old_state, int new_state)
if
(
event_list
)
{
struct
state_event
ev
;
iterator_t
itr
;
ev
.
old_state
=
old_state
;
ev
.
new_state
=
new_state
;
list_do
(
event_list
,
event_exec
,
&
ev
);
iterator_create
(
&
itr
,
event_list
);
for
(
iterator_first
(
itr
);
!
iterator_is_done
(
itr
);
iterator_next
(
itr
))
{
struct
state_event
*
p
;
iterator_current
(
itr
,
(
void
**
)
&
p
);
if
(
event_exec
(
p
,
&
ev
))
break
;
}
iterator_destroy
(
&
itr
);
}
}
...
...
Please
register
or
sign in
to post a comment