diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 17:57:21 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 17:57:21 +0100 |
commit | c6e733f87004b0852c0329cfcf92a575e99c72ba (patch) | |
tree | 3f3932958ddc9e39c9fb73ae16bce7944f7e7926 /FICS/playerdb.c | |
parent | f1006c5174fe32ff591479c0511178494e74877e (diff) |
Reformatted player_delete()
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r-- | FICS/playerdb.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index fb616ac..d492d79 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -823,19 +823,19 @@ PUBLIC int player_read(int p, char *name) return 0; } -PUBLIC int player_delete(int p) +PUBLIC int +player_delete(int p) { - char fname[MAX_FILENAME_SIZE]; + char fname[MAX_FILENAME_SIZE]; - if (!parray[p].registered) { /* Player must not be registered */ - return -1; - } -/* if (iamserver) - sprintf(fname, "%s.server/%c/%s", player_dir, parray[p].login[0], parray[p].login); - else */ - sprintf(fname, "%s/%c/%s", player_dir, parray[p].login[0], parray[p].login); - unlink(fname); - return 0; + if (!parray[p].registered) // Player must not be registered + return -1; + + snprintf(fname, sizeof fname, "%s/%c/%s", player_dir, + parray[p].login[0], parray[p].login); + unlink(fname); + + return 0; } PUBLIC int |