aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/obsproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/obsproc.c')
-rw-r--r--FICS/obsproc.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/FICS/obsproc.c b/FICS/obsproc.c
index 283ecc3..43954ff 100644
--- a/FICS/obsproc.c
+++ b/FICS/obsproc.c
@@ -90,19 +90,22 @@ GameNumFromParam(int p, int *p1, parameter *param)
PRIVATE int
gamesortfunc(const void *i, const void *j)
{
+ const int x = *(int *)i;
+ const int y = *(int *)j;
+
/*
* examine mode games moved to top of "games" output
*/
- return (GetRating(&parray[garray[*(int *)i].white],
- garray[*(int *)i].type) +
- GetRating(&parray[garray[*(int *)i].black],
- garray[*(int *)i].type) -
- (garray[*(int *)i].status == GAME_EXAMINE ? 10000 : 0) -
- GetRating(&parray[garray[*(int *)j].white],
- garray[*(int *)j].type) -
- GetRating(&parray[garray[*(int *)j].black],
- garray[*(int *)j].type) +
- (garray[*(int *)j].status == GAME_EXAMINE ? 10000 : 0));
+ return (GetRating(&parray[garray[x].white],
+ garray[x].type) +
+ GetRating(&parray[garray[x].black],
+ garray[x].type) -
+ (garray[x].status == GAME_EXAMINE ? 10000 : 0) -
+ GetRating(&parray[garray[y].white],
+ garray[y].type) -
+ GetRating(&parray[garray[y].black],
+ garray[y].type) +
+ (garray[y].status == GAME_EXAMINE ? 10000 : 0));
}
PUBLIC int