diff options
Diffstat (limited to 'src/test/mock_queue.h')
-rw-r--r-- | src/test/mock_queue.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/mock_queue.h b/src/test/mock_queue.h index 9cfd415..1c2bbf7 100644 --- a/src/test/mock_queue.h +++ b/src/test/mock_queue.h @@ -4,6 +4,7 @@ #include <stdlib.h> void mock_queue_init(); +void mock_queue_cleanup(); size_t mock_queue_len(); @@ -11,9 +12,8 @@ void mock_queue_data(size_t size, void *data); void * mock_front_data(); #define mock_queue(type, raw) do { \ - type *data = malloc(sizeof(type)); \ - *data = raw; \ - mock_queue_data(sizeof(type), data); \ + type data = raw; \ + mock_queue_data(sizeof(type), &data); \ } while(0) #define mock_front(type) * (type *) mock_front_data() |