aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-03-30 03:37:25 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2025-03-30 03:37:25 +0200
commit9d33241e8fa720f2a0575e3c3748fe7597709faf (patch)
treef334ab8cff0b304e40c4487e5402ea224d671eb6 /FICS
parent826adbf0ee603126c2397db48808c42b9da7fcf4 (diff)
Attempt to fix newly introduced bad behavior
Diffstat (limited to 'FICS')
-rw-r--r--FICS/playerdb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 1453a58..309a8fc 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1809,10 +1809,10 @@ player_remove_pendto(int p, int p1, int type)
removed = true;
}
- if (removed)
- parray[p].num_to -= 1;
+ UNUSED_VAR(removed);
+ parray[p].num_to -= 1;
- return (removed ? 0 : -1);
+ return (0);
}
PUBLIC int
@@ -1872,10 +1872,10 @@ player_remove_pendfrom(int p, int p1, int type)
removed = true;
}
- if (removed)
- parray[p].num_from -= 1;
+ UNUSED_VAR(removed);
+ parray[p].num_from -= 1;
- return (removed ? 0 : -1);
+ return (0);
}
PUBLIC int
@@ -1913,7 +1913,7 @@ player_remove_request(int p, int p1, int type)
bool removed;
int to = 0, from = 0;
- while ((to = player_find_pendto(p, p1, type)) != -1) {
+ while (to != -1 && (to = player_find_pendto(p, p1, type)) != -1) {
removed = false;
for (; to < parray[p].num_to - 1; to++) {
@@ -1927,11 +1927,11 @@ player_remove_request(int p, int p1, int type)
removed = true;
}
- if (removed)
- parray[p].num_to -= 1;
+ UNUSED_VAR(removed);
+ parray[p].num_to -= 1;
}
- while ((from = player_find_pendfrom(p1, p, type)) != -1) {
+ while (from != -1 && (from = player_find_pendfrom(p1, p, type)) != -1) {
removed = false;
for (; from < parray[p1].num_from - 1; from++) {
@@ -1946,8 +1946,8 @@ player_remove_request(int p, int p1, int type)
removed = true;
}
- if (removed)
- parray[p1].num_from -= 1;
+ UNUSED_VAR(removed);
+ parray[p1].num_from -= 1;
}
if ((type == PEND_ALL || type == PEND_MATCH) && parray[p].partner >= 0)