summaryrefslogtreecommitdiffstats
path: root/lib/datastruct/str_list.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-08-07 09:06:05 +0000
committerJim Meyering <jim@meyering.net>2007-08-07 09:06:05 +0000
commit08c9ff434bc9c2cd6bf69f577252affd42d8021a (patch)
treef7b8316b7017b880fee40fa7d9444e2c78783907 /lib/datastruct/str_list.c
parent41a94b54005c81b53501040bc4d886c9b0a3d763 (diff)
downloadlvm2-08c9ff434bc9c2cd6bf69f577252affd42d8021a.tar.gz
lvm2-08c9ff434bc9c2cd6bf69f577252affd42d8021a.tar.xz
lvm2-08c9ff434bc9c2cd6bf69f577252affd42d8021a.zip
Add "const" attributes where possible: first cut.
Diffstat (limited to 'lib/datastruct/str_list.c')
-rw-r--r--lib/datastruct/str_list.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/datastruct/str_list.c b/lib/datastruct/str_list.c
index 94705dc4..68660d99 100644
--- a/lib/datastruct/str_list.c
+++ b/lib/datastruct/str_list.c
@@ -66,7 +66,8 @@ int str_list_del(struct list *sll, const char *str)
return 1;
}
-int str_list_dup(struct dm_pool *mem, struct list *sllnew, struct list *sllold)
+int str_list_dup(struct dm_pool *mem, struct list *sllnew,
+ const struct list *sllold)
{
struct str_list *sl;
@@ -85,7 +86,7 @@ int str_list_dup(struct dm_pool *mem, struct list *sllnew, struct list *sllold)
/*
* Is item on list?
*/
-int str_list_match_item(struct list *sll, const char *str)
+int str_list_match_item(const struct list *sll, const char *str)
{
struct str_list *sl;
@@ -99,7 +100,7 @@ int str_list_match_item(struct list *sll, const char *str)
/*
* Is at least one item on both lists?
*/
-int str_list_match_list(struct list *sll, struct list *sll2)
+int str_list_match_list(const struct list *sll, const struct list *sll2)
{
struct str_list *sl;
@@ -113,7 +114,7 @@ int str_list_match_list(struct list *sll, struct list *sll2)
/*
* Do both lists contain the same set of items?
*/
-int str_list_lists_equal(struct list *sll, struct list *sll2)
+int str_list_lists_equal(const struct list *sll, const struct list *sll2)
{
struct str_list *sl;