diff options
author | 2009-11-09 10:32:48 +0000 | |
---|---|---|
committer | 2009-11-09 10:32:48 +0000 | |
commit | 07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c (patch) | |
tree | 2c85a7fab30911aac0b102e27cad4a3aeb385f8a | |
parent | the new protocol moved insert and update. (diff) | |
download | wireguard-openbsd-07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c.tar.xz wireguard-openbsd-07a4c3f2e66d2fae30ac0e8c0d46ce12af41535c.zip |
fatal on RB_INSERT failure
-rw-r--r-- | usr.sbin/smtpd/expand.c | 5 |
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 |