summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-11-09 10:32:49 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-11-09 10:32:49 +0000
commit9b74f59d3dcb5e022d91dbcb1da28a42b3bccc31 (patch)
tree1a8bd17dc88e8213d87bfef9d31f93cb2b6154c0 /usr.sbin
parent1abc0926297c5dd3ad3ba3d44133ffc558d474f4 (diff)
fatal on RB_INSERT failure
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/expand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/expand.c b/usr.sbin/smtpd/expand.c
index de71498e503..cd2865426f1 100644
--- a/usr.sbin/smtpd/expand.c
+++ b/usr.sbin/smtpd/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.1 2009/11/08 23:15:03 gilles Exp $ */
+/* $OpenBSD: expand.c,v 1.2 2009/11/09 10:32:48 jacekm Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@openbsd.org>
@@ -46,7 +46,8 @@ void
expandtree_insert(struct expandtree *expandtree, struct expand_node *node)
{
node->id = generate_uid();
- RB_INSERT(expandtree, expandtree, node);
+ if (RB_INSERT(expandtree, expandtree, node))
+ fatalx("expandtree_insert: node already exists");
}
void