X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fstrdup.c;fp=sbr%2Fstrdup.c;h=0000000000000000000000000000000000000000;hb=0052f1024deb0a0a2fc2e5bacf93d45a5a9c9b32;hp=2d30d86e4c249ece20daba046b68b4e357902067;hpb=a567638a9445d091f6334ac2de2fc0e57309eb42;p=mmh diff --git a/sbr/strdup.c b/sbr/strdup.c deleted file mode 100644 index 2d30d86..0000000 --- a/sbr/strdup.c +++ /dev/null @@ -1,26 +0,0 @@ -/* -** strdup.c -- duplicate a string -** -** This code is Copyright (c) 2002, by the authors of nmh. See the -** COPYRIGHT file in the root directory of the nmh distribution for -** complete copyright information. -*/ - -#include -#include - - -char * -strdup(const char *str) -{ - char *cp; - size_t len; - - if (!str) - return NULL; - - len = strlen(str) + 1; - cp = mh_xmalloc(len); - memcpy(cp, str, len); - return cp; -}