diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-10 01:31:09 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-10 01:31:09 +0100 |
commit | 9aabcc4bf2bf8d66a50c6a934f743c5dede3fd43 (patch) | |
tree | b687361165ea191718842e12f53630b0d7bd73c1 /FICS/comproc.c | |
parent | e49c6b0d673fec46519e3c6fb4150480026f7025 (diff) |
strdup() -> xstrdup()
Diffstat (limited to 'FICS/comproc.c')
-rw-r--r-- | FICS/comproc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index 3d33473..b85a445 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -458,7 +458,7 @@ PUBLIC int com_password(int p, param_list param) salt[0] = 'a' + rand() % 26; salt[1] = 'a' + rand() % 26; salt[2] = '\0'; - parray[p].passwd = strdup(crypt(newpassword, salt)); + parray[p].passwd = xstrdup(crypt(newpassword, salt)); pprintf(p, "Password changed to \"%s\".\n", newpassword); return COM_OK; } @@ -1285,9 +1285,9 @@ PUBLIC int com_alias(int p, param_list param) pprintf(p, "You can't alias this command.\n"); } else { parray[p].alias_list[parray[p].numAlias].comm_name = - strdup(param[0].val.word); + xstrdup(param[0].val.word); parray[p].alias_list[parray[p].numAlias].alias = - strdup(param[1].val.string); + xstrdup(param[1].val.string); parray[p].numAlias++; pprintf(p, "Alias set.\n"); @@ -1295,7 +1295,7 @@ PUBLIC int com_alias(int p, param_list param) } } else { rfree(parray[p].alias_list[al].alias); - parray[p].alias_list[al].alias = strdup(param[1].val.string); + parray[p].alias_list[al].alias = xstrdup(param[1].val.string); pprintf(p, "Alias replaced.\n"); } parray[p].alias_list[parray[p].numAlias].comm_name = NULL; |