aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/utils/linked_list.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-24 17:07:12 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-24 17:07:12 +0000
commit51ecb022cbe813bfb47552b6a558d5a3126b1964 (patch)
tree72505310bc3c8c70307ecff0e1aa61843834c19a /Source/charon/utils/linked_list.c
parent207dd9b5c0135026ccd04a0596a8f9875565b0ac (diff)
downloadstrongswan-51ecb022cbe813bfb47552b6a558d5a3126b1964.tar.bz2
strongswan-51ecb022cbe813bfb47552b6a558d5a3126b1964.tar.xz
- began to clean code documentation
Diffstat (limited to 'Source/charon/utils/linked_list.c')
-rw-r--r--Source/charon/utils/linked_list.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/charon/utils/linked_list.c b/Source/charon/utils/linked_list.c
index 63a177c05..a5188f344 100644
--- a/Source/charon/utils/linked_list.c
+++ b/Source/charon/utils/linked_list.c
@@ -1,7 +1,7 @@
/**
* @file linked_list.c
*
- * @brief Generic Double Linked List
+ * @brief Implementation of linked_list_t.
*
*/
@@ -355,16 +355,11 @@ static status_t get_first(private_linked_list_t *this, void **item)
*/
static status_t insert_last(private_linked_list_t *this, void *item)
{
- if (this == NULL)
- {
- return FAILED;
- }
-
linked_list_element_t *element = (linked_list_element_t *) linked_list_element_create(item);
if (element == NULL)
{
- return FAILED;
+ return OUT_OF_RES;
}
if (this->count == 0)
@@ -606,7 +601,7 @@ static status_t create_iterator (private_linked_list_t *linked_list, iterator_t
if (this == NULL)
{
- return FAILED;
+ return OUT_OF_RES;
}
this->public.has_next = (bool (*) (iterator_t *this)) iterator_has_next;