From 2eb2efd57d01a1eb3ddde74c22e956c65f941608 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 15:23:41 +0100 Subject: Reformatted player_remove_pendfrom() --- FICS/playerdb.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'FICS') 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 -- cgit v1.2.3