summaryrefslogtreecommitdiff
path: root/src/utils/strdup.c
blob: a59cc505784e8a3a67fa9a6585480fb4b0d9851e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*-------------------------------------------------------------------------
 *
 * strdup.c--
 *    copies a null-terminated string.
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *    $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.1 1996/11/27 01:46:52 bryanh Exp $
 *
 *-------------------------------------------------------------------------
 */
#include <string.h>
#include "strdup.h"

char *
strdup(char *string)
{
    char *nstr;

    nstr = strcpy((char *)palloc(strlen(string)+1), string);
    return nstr;
}