summaryrefslogtreecommitdiffstats
path: root/libssh/misc.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-03-01 18:11:40 +0100
committerAndreas Schneider <mail@cynapses.org>2010-03-06 12:28:56 +0100
commit9dd86859e8582eefc958a14ba4787c2488730edc (patch)
treec534e7de3c2085b379bd8dddd573bbad8be3352b /libssh/misc.c
parent810fbfb62089e299e913eef052ca8e3e2be9d090 (diff)
renamed ssh_list_get_head to ssh_list_pop_head
Diffstat (limited to 'libssh/misc.c')
-rw-r--r--libssh/misc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libssh/misc.c b/libssh/misc.c
index f64c395a..a86a163b 100644
--- a/libssh/misc.c
+++ b/libssh/misc.c
@@ -261,7 +261,14 @@ void ssh_list_remove(struct ssh_list *list, struct ssh_iterator *iterator){
SAFE_FREE(iterator);
}
-const void *_ssh_list_get_head(struct ssh_list *list){
+/** @internal
+ * @brief Removes the top element of the list and returns the data value attached
+ * to it
+ * @param list the ssh_list
+ * @returns pointer to the element being stored in head, or
+ * NULL if the list is empty.
+ */
+const void *_ssh_list_pop_head(struct ssh_list *list){
struct ssh_iterator *iterator=list->root;
const void *data;
if(!list->root)