From 9b74f59d3dcb5e022d91dbcb1da28a42b3bccc31 Mon Sep 17 00:00:00 2001 From: Jacek Masiulaniec Date: Mon, 9 Nov 2009 10:32:49 +0000 Subject: fatal on RB_INSERT failure --- usr.sbin/smtpd/expand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/smtpd') 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 @@ -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 -- cgit v1.2.3