summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:08 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:08 +0000
commit407a45a3b73a6c776dc47ce69cea5f1611a0f3eb (patch)
treed680ff64ce281f8de8c09ff6c9004a9e25db3797
parentd73f104182c4964409f98f176a66d6a73ea2b7e1 (diff)
Merge (with small conflict) from upstream.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1177 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc.c b/src/misc.c
index 68c470192..d71270fd1 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -139,16 +139,16 @@ char *stristr(char *s1, char *s2)
* @param s String
* @param size size of s
* @param old character to replace
- * @param new character to replace with
+ * @param newstr character to replace with
* @return updated s
*/
-char *strnrepl(char *s, int32 size, const char *old, const char *new)
+char *strnrepl(char *s, int32 size, const char *old, const char *newstr)
{
char *ptr = s;
int32 left = strlen(s);
int32 avail = size - (left + 1);
int32 oldlen = strlen(old);
- int32 newlen = strlen(new);
+ int32 newlen = strlen(newstr);
int32 diff = newlen - oldlen;
while (left >= oldlen) {
@@ -161,7 +161,7 @@ char *strnrepl(char *s, int32 size, const char *old, const char *new)
break;
if (diff != 0)
memmove(ptr + oldlen + diff, ptr + oldlen, left + 1 - oldlen);
- strncpy(ptr, new, newlen);
+ strncpy(ptr, newstr, newlen);
ptr += newlen;
left -= oldlen;
}