diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 15:23:41 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 15:23:41 +0100 |
commit | 2eb2efd57d01a1eb3ddde74c22e956c65f941608 (patch) | |
tree | 3e72a2defcbe99322aef8635bff4656fd5585b0a /FICS/playerdb.c | |
parent | 19990a3fe6b35948c480d850ea4057740fba87c7 (diff) |
Reformatted player_remove_pendfrom()
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r-- | FICS/playerdb.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index b350e39..3882eda 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1441,15 +1441,20 @@ PUBLIC int player_new_pendfrom(int p) return parray[p].num_from - 1; } -PUBLIC int player_remove_pendfrom(int p, int p1, int type) +PUBLIC int +player_remove_pendfrom(int p, int p1, int type) { - int w; - if ((w = player_find_pendfrom(p, p1, type)) < 0) - return -1; - for (; w < parray[p].num_from - 1; w++) - parray[p].p_from_list[w] = parray[p].p_from_list[w + 1]; - parray[p].num_from = parray[p].num_from - 1; - return 0; + int w; + + if ((w = player_find_pendfrom(p, p1, type)) < 0) + return -1; + + for (; w < (parray[p].num_from - 1); w++) + parray[p].p_from_list[w] = parray[p].p_from_list[w + 1]; + + parray[p].num_from = (parray[p].num_from - 1); + + return 0; } PUBLIC int |