Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / sup / source / estrdup.c
bloba9d5a72a461027582166eea4e72c7fcc4e27ac66
1 /* $NetBSD: salloc.c,v 1.6 2004/12/21 16:19:09 christos Exp $ */
3 /*
4 * Copyright (c) 1991 Carnegie Mellon University
5 * All Rights Reserved.
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
15 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 * Carnegie Mellon requests users of this software to return to
19 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
20 * School of Computer Science
21 * Carnegie Mellon University
22 * Pittsburgh PA 15213-3890
24 * any improvements or extensions that they make and grant Carnegie the rights
25 * to redistribute these changes.
28 **********************************************************************
29 * HISTORY
30 * 09-Apr-87 Glenn Marcy (gm0w) at Carnegie-Mellon University
31 * Changed to save length and use bcopy instead of strcpy.
33 * 02-Nov-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
34 * Created from routine by same name in Steve Shafer's sup program.
36 **********************************************************************
38 #include "supcdefs.h"
39 #include "supextern.h"
42 char *
43 estrdup(const char *p)
45 char *q;
46 if ((q = strdup(p)) == NULL)
47 goaway("Cannot allocate memory");
48 return q;