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

More code cleanups to get rid of useless casts and other useless

structures such as:
-       lp->value.cp = (char *)MyMalloc(strlen(mask) + 1);
-       (void)strcpy(lp->value.cp, mask);
+       lp->value.cp = strdup(mask);
This commit is contained in:
Bram Matthys
2018-04-22 14:28:22 +02:00
parent 680715b1b5
commit d5d446c38d
25 changed files with 86 additions and 108 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ void flag_add(char ch)
if (extraflags)
{
char tmp[2] = { ch, 0 };
newextra = (char *)MyMalloc(strlen(extraflags) + 2);
newextra = MyMallocEx(strlen(extraflags) + 2);
strcpy(newextra, extraflags);
strcat(newextra, tmp);
MyFree(extraflags);