aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/fics_addplayer.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-10 01:31:09 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-10 01:31:09 +0100
commit9aabcc4bf2bf8d66a50c6a934f743c5dede3fd43 (patch)
treeb687361165ea191718842e12f53630b0d7bd73c1 /FICS/fics_addplayer.c
parente49c6b0d673fec46519e3c6fb4150480026f7025 (diff)
strdup() -> xstrdup()
Diffstat (limited to 'FICS/fics_addplayer.c')
-rw-r--r--FICS/fics_addplayer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/FICS/fics_addplayer.c b/FICS/fics_addplayer.c
index 2a9e22e..6837e32 100644
--- a/FICS/fics_addplayer.c
+++ b/FICS/fics_addplayer.c
@@ -104,11 +104,11 @@ main(int argc, char *argv[])
fprintf(stderr, "%s already exists.\n", funame);
exit(0);
}
- parray[p].name = strdup(funame);
- parray[p].login = strdup(funame);
+ parray[p].name = xstrdup(funame);
+ parray[p].login = xstrdup(funame);
stolower(parray[p].login);
- parray[p].fullName = strdup(fname);
- parray[p].emailAddress = strdup(email);
+ parray[p].fullName = xstrdup(fname);
+ parray[p].emailAddress = xstrdup(email);
for (i = 0; i < PASSLEN; i++) {
password[i] = 'a' + rand() % 26;
}
@@ -116,7 +116,7 @@ main(int argc, char *argv[])
salt[0] = 'a' + rand() % 26;
salt[1] = 'a' + rand() % 26;
salt[2] = '\0';
- parray[p].passwd = strdup(crypt(password, salt));
+ parray[p].passwd = xstrdup(crypt(password, salt));
parray[p].registered = 1;
// parray[p].network_player = !local;
parray[p].rated = 1;