Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.312 kb
/* ultrix doesn't have strdup */
#include <string.h>
#include <stdlib.h>
char *strdup (const char *s) /* __MEM_CHECKED__ */
{
char *d;
if (s == NULL)
return NULL;
if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */
return NULL;
memcpy (d, s, strlen (s) + 1);
return d;
}
Jump to Line
Something went wrong with that request. Please try again.