Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthieu Dorier
codes
Commits
490048d7
Commit
490048d7
authored
Apr 29, 2014
by
Jonathan Jenkins
Browse files
utility function for quicklist
parent
a34a36d0
Changes
1
Show whitespace changes
Inline
Side-by-side
codes/quicklist.h
View file @
490048d7
...
...
@@ -142,6 +142,23 @@ static __inline__ struct qlist_head* qlist_pop(struct qlist_head *head)
return
item
;
}
/**
* qlist_pop_back - pop the last item off the list and return it
* @head: qlist to modify
*/
static
__inline__
struct
qlist_head
*
qlist_pop_back
(
struct
qlist_head
*
head
)
{
struct
qlist_head
*
item
=
NULL
;
if
(
!
qlist_empty
(
head
))
{
item
=
head
->
prev
;
qlist_del
(
item
);
}
return
item
;
}
/**
* qlist_splice - join two qlists
* @qlist: the new qlist to add.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment