~ubuntu-branches/ubuntu/wily/sup/wily

« back to all changes in this revision

Viewing changes to estrdup.c

  • Committer: Bazaar Package Importer
  • Author(s): Jochen Friedrich
  • Date: 2006-11-02 15:03:30 UTC
  • mfrom: (1.1.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061102150330-yt4yavw4rj1hz8yj
Tags: 20060803-2
Fix CFLAGS, so libwrap is built into sup again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*      $NetBSD: estrdup.c,v 1.1 2006/04/02 01:39:48 christos Exp $     */
 
2
 
 
3
/*
 
4
 * Copyright (c) 1991 Carnegie Mellon University
 
5
 * All Rights Reserved.
 
6
 *
 
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.
 
12
 *
 
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.
 
16
 *
 
17
 * Carnegie Mellon requests users of this software to return to
 
18
 *
 
19
 *  Software Distribution Coordinator   or   Software.Distribution@CS.CMU.EDU
 
20
 *  School of Computer Science
 
21
 *  Carnegie Mellon University
 
22
 *  Pittsburgh PA 15213-3890
 
23
 *
 
24
 * any improvements or extensions that they make and grant Carnegie the rights
 
25
 * to redistribute these changes.
 
26
 */
 
27
/*
 
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.
 
32
 *
 
33
 * 02-Nov-85  Glenn Marcy (gm0w) at Carnegie-Mellon University
 
34
 *      Created from routine by same name in Steve Shafer's sup program.
 
35
 *
 
36
 **********************************************************************
 
37
 */
 
38
#include "supcdefs.h"
 
39
#include "supextern.h"
 
40
 
 
41
 
 
42
char *
 
43
estrdup(const char *p)
 
44
{
 
45
        char *q;
 
46
        if ((q = strdup(p)) == NULL)
 
47
                goaway("Cannot allocate memory");
 
48
        return q;
 
49
}