diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 15:44:19 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 15:44:19 +0100 |
commit | b02ccb5ee3ae0b0b255b65b560d9178d07688ace (patch) | |
tree | a6de2ae351a77032708893dc7aa71a6415c59458 | |
parent | 5d5da755a66ac3940b7808c311323f200a8c1a23 (diff) |
Reformatted functions
-rw-r--r-- | FICS/playerdb.c | 34 |
1 files changed, 21 insertions, 13 deletions
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 |