aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-03 03:07:49 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-03 03:07:49 +0100
commitb6bab9010eebe1e476a757bbece7ba3c09e4eefa (patch)
treec222c4f0df3ac3b0af38c993f3f64507042ef16d /FICS
parentde13e479d6788b2496ad447b446831f181afdeca (diff)
Reformatted sort_players() and made it private
Diffstat (limited to 'FICS')
-rw-r--r--FICS/comproc.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c
index 3685f73..a3b8de4 100644
--- a/FICS/comproc.c
+++ b/FICS/comproc.c
@@ -1063,15 +1063,13 @@ PRIVATE int alpha_cmp(const void *pp1, const void *pp2)
return strcmp(parray[p1].login, parray[p2].login);
}
-PUBLIC void sort_players(int players[PARRAY_SIZE],
- int ((*cmp_func) (const void *, const void *)))
+PRIVATE void
+sort_players(int players[PARRAY_SIZE], int ((*cmp_func)(const void *,
+ const void *)))
{
- int i;
-
- for (i = 0; i < p_num; i++) {
- players[i] = i;
- }
- qsort(players, p_num, sizeof(int), cmp_func);
+ for (int i = 0; i < p_num; i++)
+ players[i] = i;
+ qsort(players, p_num, sizeof(int), cmp_func);
}
/* This is the of the most compliclicated commands in terms of parameters */