summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-11-10 19:16:57 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-11-10 19:16:57 +0100
commit598a8acfc1c1aaefb3c7407e517cc1e0f87b753a (patch)
treea255b920f806d455e3ae9ebc4b63fa4adf1d174f
parent312a9d0a2181c153f95c26d9bc39d968d1a59905 (diff)
downloadfastd-598a8acfc1c1aaefb3c7407e517cc1e0f87b753a.tar
fastd-598a8acfc1c1aaefb3c7407e517cc1e0f87b753a.zip
pqueue: remove some unnessasary assignments
-rw-r--r--src/pqueue.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pqueue.c b/src/pqueue.c
index 6c920b5..d80935f 100644
--- a/src/pqueue.c
+++ b/src/pqueue.c
@@ -53,7 +53,6 @@ static inline void pqueue_unlink(fastd_pqueue_t *elem) {
if (elem->next)
elem->next->pprev = elem->pprev;
- elem->pprev = NULL;
elem->next = NULL;
}
@@ -101,7 +100,6 @@ static fastd_pqueue_t * pqueue_merge_pairs(fastd_pqueue_t *pqueue0) {
fastd_pqueue_t *pqueue2 = pqueue1->next;
pqueue0->next = pqueue1->next = NULL;
- pqueue0->pprev = pqueue1->pprev = NULL;
return pqueue_merge(pqueue_merge(pqueue0, pqueue1), pqueue_merge_pairs(pqueue2));
}
@@ -130,5 +128,6 @@ void fastd_pqueue_remove(fastd_pqueue_t *elem) {
if (merged)
pqueue_link(pprev, merged);
+ elem->pprev = NULL;
elem->children = NULL;
}