X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fportab%2Fstrndup.c;h=d63b972867184da3e4137ab2cdead0fd31f7b909;hb=9811223fb882413645db38948ac05fa21ddd3514;hp=d6e01c943299e9b696731b182d3893bb2686b148;hpb=6ac5a82eecb76ec35f3f484149ad668073a52620;p=ngircd-alex.git diff --git a/src/portab/strndup.c b/src/portab/strndup.c index d6e01c94..d63b9728 100644 --- a/src/portab/strndup.c +++ b/src/portab/strndup.c @@ -11,13 +11,10 @@ #ifndef HAVE_STRNDUP -#include "imp.h" #include #include #include -#include "exp.h" - GLOBAL char * strndup(const char *s, size_t maxlen) { @@ -30,8 +27,8 @@ strndup(const char *s, size_t maxlen) dup = malloc(len); if (dup) strlcpy(dup, s, len); + return dup; } #endif -