summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacekm <jacekm@openbsd.org>2009-11-09 10:32:48 +0000
committerjacekm <jacekm@openbsd.org>2009-11-09 10:32:48 +0000
commit07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c (patch)
tree2c85a7fab30911aac0b102e27cad4a3aeb385f8a
parentthe new protocol moved insert and update. (diff)
downloadwireguard-openbsd-07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c.tar.xz
wireguard-openbsd-07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c.zip
fatal on RB_INSERT failure
-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