diff options
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc.c b/src/misc.c index e3bcd899d..49b08e7cd 100644 --- a/src/misc.c +++ b/src/misc.c @@ -910,9 +910,13 @@ char *host_resolve(char *host) char *anopeStrDup(const char *src) { char *ret=NULL; if(src) { +#ifdef __STRICT_ANSI__ if( (ret = (char *)malloc(strlen(src)+1)) ) {; strcpy(ret,src); } +#else + ret = strdup(src); /* this way will prolly be faster, use it if we can */ +#endif } return ret; } |