* POSSIBILITY OF SUCH DAMAGE.
*/
+static int inited = 0;
+
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: _env.c,v 1.5 2010/11/17 13:25:53 tron Exp $");
env_node_t *node;
_DIAGASSERT(envvar != NULL);
+ assert(inited);
node = rb_tree_find_node(&env_tree, envvar);
if (node != NULL) {
rb_tree_remove_node(&env_tree, node);
{
env_node_t *node;
+ assert(inited);
node = malloc(sizeof(*node) + length);
if (node != NULL) {
node->length = length;
{
env_node_t *node;
+ assert(inited);
+
_DIAGASSERT(envvar != NULL);
node = rb_tree_find_node(&env_tree, envvar);
size_t num_entries;
env_node_t *node, *next;
+ assert(inited);
while (++marker == 0);
/* Mark all nodes which are currently used. */
void
__libc_env_init(void)
{
+ assert(!inited);
rb_tree_init(&env_tree, &env_tree_ops);
+ inited = 1;
}