diff options
author | irungentoo <irungentoo@gmail.com> | 2015-05-01 15:13:38 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-05-01 15:13:38 -0400 |
commit | 7d13f1928e604b87c29ca22d8bf14e962c1cc8ed (patch) | |
tree | 4c9ff324a2516b3c5a7136dedc95fcf5f82a9038 /toxcore/list.h | |
parent | b2c966a6e39cb9c7be9b498da2e603e0111e5223 (diff) |
Fixed some non standard C.
Replaced void * with uint8_t * in list.c
Diffstat (limited to 'toxcore/list.h')
-rw-r--r-- | toxcore/list.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/list.h b/toxcore/list.h index 03ac04dd..b04177e1 100644 --- a/toxcore/list.h +++ b/toxcore/list.h | |||
@@ -34,7 +34,7 @@ typedef struct { | |||
34 | uint32_t n; //number of elements | 34 | uint32_t n; //number of elements |
35 | uint32_t capacity; //number of elements memory is allocated for | 35 | uint32_t capacity; //number of elements memory is allocated for |
36 | uint32_t element_size; //size of the elements | 36 | uint32_t element_size; //size of the elements |
37 | void *data; //array of elements | 37 | uint8_t *data; //array of elements |
38 | int *ids; //array of element ids | 38 | int *ids; //array of element ids |
39 | } BS_LIST; | 39 | } BS_LIST; |
40 | 40 | ||
@@ -56,7 +56,7 @@ void bs_list_free(BS_LIST *list); | |||
56 | * >= 0 : id associated with data | 56 | * >= 0 : id associated with data |
57 | * -1 : failure | 57 | * -1 : failure |
58 | */ | 58 | */ |
59 | int bs_list_find(const BS_LIST *list, const void *data); | 59 | int bs_list_find(const BS_LIST *list, const uint8_t *data); |
60 | 60 | ||
61 | /* Add an element with associated id to the list | 61 | /* Add an element with associated id to the list |
62 | * | 62 | * |
@@ -64,7 +64,7 @@ int bs_list_find(const BS_LIST *list, const void *data); | |||
64 | * 1 : success | 64 | * 1 : success |
65 | * 0 : failure (data already in list) | 65 | * 0 : failure (data already in list) |
66 | */ | 66 | */ |
67 | int bs_list_add(BS_LIST *list, const void *data, int id); | 67 | int bs_list_add(BS_LIST *list, const uint8_t *data, int id); |
68 | 68 | ||
69 | /* Remove element from the list | 69 | /* Remove element from the list |
70 | * | 70 | * |
@@ -72,7 +72,7 @@ int bs_list_add(BS_LIST *list, const void *data, int id); | |||
72 | * 1 : success | 72 | * 1 : success |
73 | * 0 : failure (element not found or id does not match) | 73 | * 0 : failure (element not found or id does not match) |
74 | */ | 74 | */ |
75 | int bs_list_remove(BS_LIST *list, const void *data, int id); | 75 | int bs_list_remove(BS_LIST *list, const uint8_t *data, int id); |
76 | 76 | ||
77 | /* Removes the memory overhead | 77 | /* Removes the memory overhead |
78 | * | 78 | * |