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
6ed28e0a
...
6ed28e0a60638e6f4d744487c8745cb9fb4aaca7
authored
2002-11-19 14:04:24 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(sieve_slist_destroy): Use list_do. It is faster.
1 parent
7c671ef4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
libsieve/util.c
libsieve/util.c
View file @
6ed28e0
...
...
@@ -100,21 +100,19 @@ sieve_pfree (list_t *pool, void *ptr)
free
(
ptr
);
}
static
int
_destroy_item
(
void
*
item
,
void
*
data
)
{
free
(
item
);
return
0
;
}
void
sieve_slist_destroy
(
list_t
*
plist
)
{
iterator_t
itr
;
if
(
!
plist
||
iterator_create
(
&
itr
,
*
plist
))
if
(
!
plist
)
return
;
for
(
iterator_first
(
itr
);
!
iterator_is_done
(
itr
);
iterator_next
(
itr
))
{
char
*
s
;
iterator_current
(
itr
,
(
void
**
)
&
s
);
free
(
s
);
}
iterator_destroy
(
&
itr
);
list_do
(
*
plist
,
_destroy_item
,
NULL
);
list_destroy
(
plist
);
}
...
...
@@ -231,7 +229,7 @@ _sieve_default_parse_error (void *unused, const char *filename, int lineno,
const
char
*
fmt
,
va_list
ap
)
{
if
(
filename
)
fprintf
(
stderr
,
"%s:%d: "
,
filename
,
lineno
);
fprintf
(
stderr
,
"%s:%d: "
,
filename
,
lineno
);
vfprintf
(
stderr
,
fmt
,
ap
);
fprintf
(
stderr
,
"
\n
"
);
return
0
;
...
...
Please
register
or
sign in
to post a comment