1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

str_list_del

This commit is contained in:
Alasdair Kergon 2003-10-15 20:01:12 +00:00
parent aa37899857
commit 13057fe53f
2 changed files with 14 additions and 0 deletions

View File

@ -33,3 +33,16 @@ int str_list_add(struct pool *mem, struct list *sl, const char *str)
return 1;
}
int str_list_del(struct list *sl, const char *str)
{
struct list *slh, *slht;
list_iterate_safe(slh, slht, sl) {
if (!strcmp(str, list_item(slh, struct str_list)->str))
list_del(slh);
}
return 1;
}

View File

@ -10,5 +10,6 @@
#include "pool.h"
int str_list_add(struct pool *mem, struct list *sl, const char *str);
int str_list_del(struct list *sl, const char *str);
#endif