147c08596SBrooks Davis /* $OpenBSD: tree.c,v 1.13 2004/05/06 22:29:15 deraadt Exp $ */ 247c08596SBrooks Davis 347c08596SBrooks Davis /* Routines for manipulating parse trees... */ 447c08596SBrooks Davis 5*8a16b7a1SPedro F. Giffuni /*- 6*8a16b7a1SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 7*8a16b7a1SPedro F. Giffuni * 847c08596SBrooks Davis * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium. 947c08596SBrooks Davis * All rights reserved. 1047c08596SBrooks Davis * 1147c08596SBrooks Davis * Redistribution and use in source and binary forms, with or without 1247c08596SBrooks Davis * modification, are permitted provided that the following conditions 1347c08596SBrooks Davis * are met: 1447c08596SBrooks Davis * 1547c08596SBrooks Davis * 1. Redistributions of source code must retain the above copyright 1647c08596SBrooks Davis * notice, this list of conditions and the following disclaimer. 1747c08596SBrooks Davis * 2. Redistributions in binary form must reproduce the above copyright 1847c08596SBrooks Davis * notice, this list of conditions and the following disclaimer in the 1947c08596SBrooks Davis * documentation and/or other materials provided with the distribution. 2047c08596SBrooks Davis * 3. Neither the name of The Internet Software Consortium nor the names 2147c08596SBrooks Davis * of its contributors may be used to endorse or promote products derived 2247c08596SBrooks Davis * from this software without specific prior written permission. 2347c08596SBrooks Davis * 2447c08596SBrooks Davis * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND 2547c08596SBrooks Davis * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 2647c08596SBrooks Davis * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2747c08596SBrooks Davis * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2847c08596SBrooks Davis * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR 2947c08596SBrooks Davis * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3047c08596SBrooks Davis * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3147c08596SBrooks Davis * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 3247c08596SBrooks Davis * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 3347c08596SBrooks Davis * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 3447c08596SBrooks Davis * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 3547c08596SBrooks Davis * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3647c08596SBrooks Davis * SUCH DAMAGE. 3747c08596SBrooks Davis * 3847c08596SBrooks Davis * This software has been written for the Internet Software Consortium 3947c08596SBrooks Davis * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie 4047c08596SBrooks Davis * Enterprises. To learn more about the Internet Software Consortium, 4147c08596SBrooks Davis * see ``http://www.vix.com/isc''. To learn more about Vixie 4247c08596SBrooks Davis * Enterprises, see ``http://www.vix.com''. 4347c08596SBrooks Davis */ 4447c08596SBrooks Davis 458794fdbbSBrooks Davis #include <sys/cdefs.h> 468794fdbbSBrooks Davis __FBSDID("$FreeBSD$"); 478794fdbbSBrooks Davis 4847c08596SBrooks Davis #include "dhcpd.h" 4947c08596SBrooks Davis 5047c08596SBrooks Davis extern int h_errno; 5147c08596SBrooks Davis 5247c08596SBrooks Davis pair 5347c08596SBrooks Davis cons(caddr_t car, pair cdr) 5447c08596SBrooks Davis { 5547c08596SBrooks Davis pair foo = calloc(1, sizeof(*foo)); 5647c08596SBrooks Davis if (!foo) 5747c08596SBrooks Davis error("no memory for cons."); 5847c08596SBrooks Davis foo->car = car; 5947c08596SBrooks Davis foo->cdr = cdr; 6047c08596SBrooks Davis return (foo); 6147c08596SBrooks Davis } 62