OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [gdb-5.0/] [libiberty/] [strdup.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
char *
2
strdup(s)
3
     char *s;
4
{
5
    char *result = (char*)malloc(strlen(s) + 1);
6
    if (result == (char*)0)
7
        return (char*)0;
8
    strcpy(result, s);
9
    return result;
10
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.