aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/playerdb.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 048ad38..7f12be5 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1689,21 +1689,25 @@ PUBLIC int player_add_observe(int p, int g)
return 0;
}
-PUBLIC int player_remove_observe(int p, int g)
+PUBLIC int
+player_remove_observe(int p, int g)
{
- int i;
+ int i;
- for (i = 0; i < parray[p].num_observe; i++) {
- if (parray[p].observe_list[i] == g)
- break;
- }
- if (i == parray[p].num_observe)
- return -1; /* Not found! */
- for (; i < parray[p].num_observe - 1; i++) {
- parray[p].observe_list[i] = parray[p].observe_list[i + 1];
- }
- parray[p].num_observe--;
- return 0;
+ for (i = 0; i < parray[p].num_observe; i++) {
+ if (parray[p].observe_list[i] == g)
+ break;
+ }
+
+ if (i == parray[p].num_observe)
+ return -1; // Not found!
+
+ for (; i < (parray[p].num_observe - 1); i++)
+ parray[p].observe_list[i] = parray[p].observe_list[i + 1];
+
+ parray[p].num_observe--;
+
+ return 0;
}
PUBLIC int