Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
b65db76e
Commit
b65db76e
authored
May 04, 2012
by
Alejandro Mery
Browse files
sunxi-tools.h: add list_last() helper
parent
065e3acd
Changes
1
Show whitespace changes
Inline
Side-by-side
sunxi-tools.h
View file @
b65db76e
...
@@ -48,6 +48,12 @@ static inline void list_append(struct list_entry *l0, struct list_entry *l1)
...
@@ -48,6 +48,12 @@ static inline void list_append(struct list_entry *l0, struct list_entry *l1)
l0
->
prev
=
l1
;
l0
->
prev
=
l1
;
}
}
/** returns list element of a list */
static
inline
struct
list_entry
*
list_last
(
struct
list_entry
*
l
)
{
return
(
l
->
prev
==
l
)
?
(
void
*
)
0
:
l
->
prev
;
}
/** is list empty? */
/** is list empty? */
static
inline
int
list_empty
(
struct
list_entry
*
l
)
static
inline
int
list_empty
(
struct
list_entry
*
l
)
{
{
...
...
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