aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-31 13:56:32 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-31 13:56:32 +0100
commitf3e4d3e2f3ea0cf4558cfa9a5ceeebf171c9df15 (patch)
tree5fbe3e0ed853b696fcaf7f43ffd3622864d15126 /FICS/playerdb.c
parentd8fa3f0d2f638202b3f0ba6b62b1f11b1899d883 (diff)
Reformatted player_num_results()
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 208804f..a275c4f 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1853,16 +1853,20 @@ PUBLIC int player_num_active_boards(int p)
return count;
}
-PUBLIC int player_num_results(int p, int result)
+PUBLIC int
+player_num_results(int p, int result)
{
- int count = 0, i;
+ int count = 0;
- if (!parray[p].simul_info.numBoards)
- return 0;
- for (i = 0; i < parray[p].simul_info.numBoards; i++)
- if (parray[p].simul_info.results[i] == result)
- count++;
- return count;
+ if (!parray[p].simul_info.numBoards)
+ return 0;
+
+ for (int i = 0; i < parray[p].simul_info.numBoards; i++) {
+ if (parray[p].simul_info.results[i] == result)
+ count++;
+ }
+
+ return count;
}
PUBLIC int