diff options
author | notsecure <notsecure@marek.ca> | 2014-05-19 17:53:29 -0400 |
---|---|---|
committer | notsecure <notsecure@marek.ca> | 2014-05-19 17:53:29 -0400 |
commit | 410294da4882fa7e66e0acc8e323e00dcb2618f9 (patch) | |
tree | 16121d985cfb894cd3efa9f9c6e16470838bdbf6 /toxcore/list.h | |
parent | fe66fcc7e4053a7ec7e59d22a1e4847980c90d6a (diff) |
style, failure check on realloc
Diffstat (limited to 'toxcore/list.h')
-rw-r--r-- | toxcore/list.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toxcore/list.h b/toxcore/list.h index 1fbea7ad..ac22435b 100644 --- a/toxcore/list.h +++ b/toxcore/list.h | |||
@@ -27,13 +27,12 @@ | |||
27 | #include <stdint.h> | 27 | #include <stdint.h> |
28 | #include <string.h> | 28 | #include <string.h> |
29 | 29 | ||
30 | typedef struct | 30 | typedef struct { |
31 | { | ||
32 | uint32_t n; //number of elements | 31 | uint32_t n; //number of elements |
33 | uint32_t size; //size of the elements | 32 | uint32_t size; //size of the elements |
34 | void *data; //array of elements | 33 | void *data; //array of elements |
35 | int *ids; //array of element ids | 34 | int *ids; //array of element ids |
36 | }LIST; | 35 | } LIST; |
37 | 36 | ||
38 | /* Initialize a list, element_size is the size of the elements in the list */ | 37 | /* Initialize a list, element_size is the size of the elements in the list */ |
39 | void list_init(LIST *list, uint32_t element_size); | 38 | void list_init(LIST *list, uint32_t element_size); |