]> git.cworth.org Git - kub/blobdiff - kub.c
One final(hopefully) fix to qsort
[kub] / kub.c
diff --git a/kub.c b/kub.c
index 638fb12e3a2380976d3a090d25874a76050a719d..88b678e3ef6e619a05e76a32be414d69877480d8 100644 (file)
--- a/kub.c
+++ b/kub.c
@@ -75,12 +75,6 @@ static void player_init(player_t *player)
 }
 
 
-static int card_compare(card_t *card_one, card_t *card_two)
-{
-    return card_one->number - card_two->number;
-}
-
-
 /* 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 */
@@ -93,7 +87,7 @@ static int card_group_is_run_one(card_group_t *card_group)
 {
     int i;
     qsort (&card_group->cards[0], card_group->num_cards,
-          sizeof (card_t), card_compare() );
+          sizeof (card_t), card_compare);
           
     if (card_group->num_cards > 13 || card_group->num_cards < 3)
     {