Back to index

glibc  2.9
xstrdup.c File Reference
#include <strings.h>

Go to the source code of this file.


void * xmalloc (size_t n) __THROW
char * xstrdup (char *string) __THROW

Function Documentation

void* xmalloc ( size_t  n)

Definition at line 77 of file xmalloc.c.

  VOID *p;

  p = malloc (n);
  if (p == 0)
    p = fixup_null_alloc (n);
  return p;
char * xstrdup ( char *  string)

Definition at line 34 of file xstrdup.c.

  return strcpy (xmalloc (strlen (string) + 1), string);

Here is the call graph for this function: