From b02ccb5ee3ae0b0b255b65b560d9178d07688ace Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 15:44:19 +0100 Subject: Reformatted functions --- FICS/playerdb.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'FICS') diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 9f6d4c7..4b88ae9 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1391,23 +1391,31 @@ PUBLIC int player_find_pendto(int p, int p1, int type) return -1; } -PUBLIC int player_new_pendto(int p) +PUBLIC int +player_new_pendto(int p) { - if (parray[p].num_to >= MAX_PENDING) - return -1; - parray[p].num_to++; - return parray[p].num_to - 1; + if (parray[p].num_to >= MAX_PENDING) + return -1; + + parray[p].num_to++; + + return (parray[p].num_to - 1); } -PUBLIC int player_remove_pendto(int p, int p1, int type) +PUBLIC int +player_remove_pendto(int p, int p1, int type) { - int w; - if ((w = player_find_pendto(p, p1, type)) < 0) - return -1; - for (; w < parray[p].num_to - 1; w++) - parray[p].p_to_list[w] = parray[p].p_to_list[w + 1]; - parray[p].num_to = parray[p].num_to - 1; - return 0; + int w; + + if ((w = player_find_pendto(p, p1, type)) < 0) + return -1; + + for (; w < (parray[p].num_to - 1); w++) + parray[p].p_to_list[w] = parray[p].p_to_list[w + 1]; + + parray[p].num_to = (parray[p].num_to - 1); + + return 0; } PUBLIC int -- cgit v1.2.3