]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/portab/strdup.c
Change log messages issued for IP address forgeries
[ngircd-alex.git] / src / portab / strdup.c
index 7c0ee8fd26d34b5746267f0da0f7d73cd9216101..adb19e7aa222b1ed9c38912f037fb6fab02d7fcf 100644 (file)
 
 #ifndef HAVE_STRDUP
 
-#include "imp.h"
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 
-#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
-