projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd86dee
)
prioq: add one more assertion
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 16 Oct 2018 14:35:22 +0000
(23:35 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 16 Oct 2018 16:08:51 +0000
(
01:08
+0900)
src/basic/prioq.c
patch
|
blob
|
history
diff --git
a/src/basic/prioq.c
b/src/basic/prioq.c
index
e816b2c
..
1e4d8d1
100644
(file)
--- a/
src/basic/prioq.c
+++ b/
src/basic/prioq.c
@@
-88,6
+88,7
@@
static void swap(Prioq *q, unsigned j, unsigned k) {
static unsigned shuffle_up(Prioq *q, unsigned idx) {
assert(q);
+ assert(idx < q->n_items);
while (idx > 0) {
unsigned k;