From 4b9e56ebf47db8be740f4ff2a4b9fceb9f143055 Mon Sep 17 00:00:00 2001 From: Mario Kilies Date: Sun, 16 Jan 2011 08:41:04 +0100 Subject: Refactored cardstack and tablestacks to card_stack_t and table_stacks_t, that both now are defined as structs rather than arrays. Inserted lots of assert() calls to functions that take pointers as arguments. --- src/pnoc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pnoc.c') diff --git a/src/pnoc.c b/src/pnoc.c index 0bfacad..387f127 100644 --- a/src/pnoc.c +++ b/src/pnoc.c @@ -1,4 +1,5 @@ #include "pnoc.h" +#include #include static int pnoc_comparator(const void *a, const void *b) @@ -11,5 +12,7 @@ static int pnoc_comparator(const void *a, const void *b) void pnoc_sort(pnoc_t pnoc[], const uint8_t num_tuples) { + assert(pnoc != NULL); + qsort(pnoc, num_tuples, sizeof(pnoc_t), pnoc_comparator); } -- cgit v1.2.3