From fac5e3de0929c3abb73da552efbda6d641136588 Mon Sep 17 00:00:00 2001 From: Mario Kilies Date: Sun, 16 Jan 2011 07:57:28 +0100 Subject: Simplified net_recv(). Refactored 'hand' from array definition to hand_t struct definition. --- src/hand.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/hand.c') diff --git a/src/hand.c b/src/hand.c index 8c2a392..3f8c8ff 100644 --- a/src/hand.c +++ b/src/hand.c @@ -1,5 +1,6 @@ #include "hand.h" #include +#include #include "card.h" static int hand_comparator(const void *a, const void *b) @@ -10,7 +11,8 @@ static int hand_comparator(const void *a, const void *b) return c1 - c2; } -void hand_sort(hand h) +void hand_sort(hand_t *h) { - qsort(h, MAX_HAND_CARDS, sizeof(card), hand_comparator); + assert(h != NULL); + qsort(h->cards, MAX_HAND_CARDS, sizeof(card), hand_comparator); } -- cgit v1.2.3