summaryrefslogtreecommitdiffhomepage
path: root/utils.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-24 20:46:07 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-24 20:46:07 +0200
commit32872acd743064ff090b85c4f6b8aedba0314d4f (patch)
tree527ba6cc9eb21a6fb2daa4f20f700312592512b9 /utils.c
parente9e3a0dcee387f9d3a51eededd194441fbcf1aed (diff)
fix a logic error leading to segfaults on updates
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 5219546..ba31b64 100644
--- a/utils.c
+++ b/utils.c
@@ -39,7 +39,7 @@ vlist_add(struct vlist_tree *tree, struct vlist_node *node)
anode = avl_find(&tree->avl, key);
if (anode) {
old_node = container_of(anode, struct vlist_node, avl);
- if (tree->keep_old || !tree->no_delete)
+ if (tree->keep_old || tree->no_delete)
goto update_only;
avl_delete(&tree->avl, anode);