]> git.cworth.org Git - kub/commitdiff
Fix signature of card_compare to make qsort happy
authorCarl Worth <cworth@cworth.org>
Tue, 20 Feb 2007 14:15:45 +0000 (06:15 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 20 Feb 2007 14:15:45 +0000 (06:15 -0800)
It really wants to see 'const void *' arguments.

kub.c

diff --git a/kub.c b/kub.c
index f7f2fe3edf9e7c1818b8af5233f48a8749a19946..2ded5902b7e09301c01cb3334b066949116e4ca1 100644 (file)
--- a/kub.c
+++ b/kub.c
@@ -84,8 +84,10 @@ static void player_init(player_t *player)
 /* If card_one < card_two, then return value will be negative
    if they are equal, 0 will be returned,
    if card_one > card_two, then return value will be positive */
-static int card_compare(card_t *card_one, card_t *card_two)
+static int card_compare(const void *one, const void *two)
 {
+    const card_t *card_one = one;
+    const card_t *card_two = two;
     return card_one->number - card_two->number;
 }