projects
/
platform
/
core
/
system
/
faultd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db304ce
)
util: queue: use list_del_init() instead of list_del() for pop()
08/129508/1
author
Krzysztof Opasiak
<k.opasiak@samsung.com>
Tue, 16 May 2017 18:21:00 +0000
(20:21 +0200)
committer
Krzysztof Opasiak
<k.opasiak@samsung.com>
Tue, 16 May 2017 20:48:54 +0000
(22:48 +0200)
Let's use list_del_init() instead of list_del() for queue_pop()
to avoid putting queue element in inconsistent state.
Change-Id: I68f78d6d22315e9f3e716589e70175b471672ebc
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/util/queue.h
patch
|
blob
|
history
diff --git
a/src/util/queue.h
b/src/util/queue.h
index 7ba2cc96a50db0eb2f20a9637a22b7e5fd771f5f..912f066c13910fa2513459ab30973622c7720cda 100644
(file)
--- a/
src/util/queue.h
+++ b/
src/util/queue.h
@@
-37,7
+37,7
@@
type *elem__; \
elem__ = list_first_entry_or_null(head, type, member); \
if (elem__) \
- list_del
(&elem__->member);
\
+ list_del
_init(&elem__->member);
\
elem__; \
})