summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2012-02-20 22:44:51 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2012-02-20 22:44:51 +0000
commitb73a0620371157745cb3b4836ecc30ac4b8c2402 (patch)
tree82286ff7e99f83d0046694ee46b7e771468cbbd8 /src
parent4334a9d5c2eb2915807de3a5065915a09e8fdaec (diff)
downloadlibdom-b73a0620371157745cb3b4836ecc30ac4b8c2402.tar.gz
libdom-b73a0620371157745cb3b4836ecc30ac4b8c2402.tar.bz2
Revert r13456
svn path=/trunk/libdom/; revision=13457
Diffstat (limited to 'src')
-rw-r--r--src/utils/list.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils/list.h b/src/utils/list.h
index 710c520..6e3ba20 100644
--- a/src/utils/list.h
+++ b/src/utils/list.h
@@ -40,8 +40,7 @@ static inline void list_append(struct list_entry *head, struct list_entry *new)
{
new->next = head;
new->prev = head->prev;
- if (head->prev != NULL)
- head->prev->next = new;
+ head->prev->next = new;
head->prev = new;
}
@@ -52,10 +51,8 @@ static inline void list_append(struct list_entry *head, struct list_entry *new)
*/
static inline void list_del(struct list_entry *ent)
{
- if (ent->prev != NULL)
- ent->prev->next = ent->next;
- if (ent->next != NULL)
- ent->next->prev = ent->prev;
+ ent->prev->next = ent->next;
+ ent->next->prev = ent->prev;
ent->prev = ent;
ent->next = ent;