aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/linked_list.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-06-09 09:49:28 +0200
committerTobias Brunner <tobias@strongswan.org>2011-07-06 09:43:46 +0200
commit2bf9d39da64382e143b7201ec12888e42279da93 (patch)
tree236da89468b4e1d786d08abdf0f45450b1500e1d /src/libstrongswan/utils/linked_list.h
parentc225f9b5585e1589d98a77b089924a8d4a70e216 (diff)
downloadstrongswan-2bf9d39da64382e143b7201ec12888e42279da93.tar.bz2
strongswan-2bf9d39da64382e143b7201ec12888e42279da93.tar.xz
Make sure the enumerator stops after all items have been enumerated.
This also changes how insert_before behaves, before enumeration items are inserted first, after enumeration last.
Diffstat (limited to 'src/libstrongswan/utils/linked_list.h')
-rw-r--r--src/libstrongswan/utils/linked_list.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstrongswan/utils/linked_list.h b/src/libstrongswan/utils/linked_list.h
index 47c003d32..cb3d53e58 100644
--- a/src/libstrongswan/utils/linked_list.h
+++ b/src/libstrongswan/utils/linked_list.h
@@ -95,9 +95,10 @@ struct linked_list_t {
/**
* Inserts a new item before the item the enumerator currently points to.
*
- * If the enumerator's position is invalid, e.g. at the end of the list,
- * the item is inserted last. This is helpful when inserting items into a
- * sorted list.
+ * If this method is called before starting the enumeration the item is
+ * inserted first. If it is called after all items have been enumerated
+ * the item is inserted last. This is helpful when inserting items into
+ * a sorted list.
*
* @note The position of the enumerator is not changed.
*