1 /*-------------------------------------------------------------------------
4 * copies a null-terminated string.
6 * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL: pgsql/src/port/strdup.c,v 1.9 2006/03/05 15:59:10 momjian Exp $
13 *-------------------------------------------------------------------------
22 strdup(const char *string)
26 nstr = (char *) malloc(strlen(string) + 1);