diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 03:07:49 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 03:07:49 +0100 |
commit | b6bab9010eebe1e476a757bbece7ba3c09e4eefa (patch) | |
tree | c222c4f0df3ac3b0af38c993f3f64507042ef16d /FICS/comproc.c | |
parent | de13e479d6788b2496ad447b446831f181afdeca (diff) |
Reformatted sort_players() and made it private
Diffstat (limited to 'FICS/comproc.c')
-rw-r--r-- | FICS/comproc.c | 14 |
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 */ |