diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-10-13 05:22:13 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-10-13 05:22:13 +0000 |
commit | 3fb17634a05f1bd4155d2b7fd851c91fc516d1df (patch) | |
tree | 17fd46a3f19e3f8682693755a5636fc7144999ca /src/misc.c | |
parent | ee5de492f765f02b09fee772540017fb5ea1007e (diff) |
BUILD : 1.7.5 (392) BUGS : N/A NOTES : More code tidy with strict enabled, some clean up of Unreal32
git-svn-id: svn://svn.anope.org/anope/trunk@392 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@257 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c index 4820a9fae..e3bcd899d 100644 --- a/src/misc.c +++ b/src/misc.c @@ -896,7 +896,7 @@ char *host_resolve(char *host) memcpy(&ip, hentp->h_addr, sizeof(hentp->h_length)); addr.s_addr = ip; ntoa(addr, ipbuf, sizeof(ipbuf)); - ipreturn = strdup(ipbuf); + ipreturn = anopeStrDup(ipbuf); if (debug) { alog("Resolved %s to %s",host, ipbuf); } @@ -907,3 +907,13 @@ char *host_resolve(char *host) } } +char *anopeStrDup(const char *src) { + char *ret=NULL; + if(src) { + if( (ret = (char *)malloc(strlen(src)+1)) ) {; + strcpy(ret,src); + } + } + return ret; +} + |