X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fportab%2Fstrdup.c;fp=src%2Fportab%2Fstrdup.c;h=795af7262ab61bbedbb09f797a5d72947427537a;hp=7c0ee8fd26d34b5746267f0da0f7d73cd9216101;hb=51396f8f1c10506b558ce98aafb80aff4b2a95bd;hpb=6238196dac6cab9dae0b4d01190a7fad307d5a93 diff --git a/src/portab/strdup.c b/src/portab/strdup.c index 7c0ee8fd..795af726 100644 --- a/src/portab/strdup.c +++ b/src/portab/strdup.c @@ -19,18 +19,19 @@ #include "exp.h" GLOBAL char * -strdup( const char *s ) +strdup(const char *s) { - char *dup; - size_t len = strlen( s ); - size_t alloc = len + 1; + char *dup; + size_t len = strlen(s); + size_t alloc = len + 1; - if (len >= alloc ) return NULL; - dup = malloc( alloc ); - if (dup) strlcpy(dup, s, alloc ); + if (len >= alloc) + return NULL; + dup = malloc(alloc); + if (dup) + strlcpy(dup, s, alloc ); -return dup; + return dup; } #endif -