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/net_client.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/net_client.c') diff --git a/src/net_client.c b/src/net_client.c index 9134cf7..a225529 100644 --- a/src/net_client.c +++ b/src/net_client.c @@ -110,14 +110,16 @@ player_list* client_recv_player_list(const uint8_t* payload, const uint8_t data_ return players; } -hand* client_recv_deal_cards(const uint8_t* payload, const uint8_t payload_len) +hand_t *client_recv_deal_cards(const uint8_t* payload, const uint8_t payload_len) { - hand* h = malloc(sizeof(hand)); + hand_t *h = malloc(sizeof(hand_t)); assert(payload_len == MAX_HAND_CARDS); // deal_cards packet have fixed size for(int i=0; icards[i] = payload[i]; + } return h; } -- cgit v1.2.3