1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 19:23:12 +02:00

Move strtolower_safe() from antirandom to support.c

This commit is contained in:
Bram Matthys
2021-05-15 15:38:57 +02:00
parent 7fa0e07487
commit ff84f17f72
3 changed files with 16 additions and 14 deletions
-14
View File
@@ -858,20 +858,6 @@ static int internal_getscore(char *str)
return score;
}
void strtolower_safe(char *dst, char *src, int size)
{
if (!size)
return; /* size of 0 is unworkable */
size--; /* for \0 */
for (; *src && size; src++)
{
*dst++ = tolower(*src);
size--;
}
*dst = '\0';
}
/** Returns "spam score".
* @note a user is expected, do not call for anything else (eg: servers)
*/