diff options
Diffstat (limited to 'toxcore/list.c')
-rw-r--r-- | toxcore/list.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/list.c b/toxcore/list.c index 301e56f8..b97727f8 100644 --- a/toxcore/list.c +++ b/toxcore/list.c | |||
@@ -45,7 +45,7 @@ | |||
45 | * < 0 : no match, returns index (return value is INDEX(index)) where | 45 | * < 0 : no match, returns index (return value is INDEX(index)) where |
46 | * the data should be inserted | 46 | * the data should be inserted |
47 | */ | 47 | */ |
48 | static int find(const BS_LIST *list, const void *data) | 48 | static int find(const BS_LIST *list, const uint8_t *data) |
49 | { | 49 | { |
50 | //should work well, but could be improved | 50 | //should work well, but could be improved |
51 | if (list->n == 0) { | 51 | if (list->n == 0) { |
@@ -162,7 +162,7 @@ void bs_list_free(BS_LIST *list) | |||
162 | free(list->ids); | 162 | free(list->ids); |
163 | } | 163 | } |
164 | 164 | ||
165 | int bs_list_find(const BS_LIST *list, const void *data) | 165 | int bs_list_find(const BS_LIST *list, const uint8_t *data) |
166 | { | 166 | { |
167 | int r = find(list, data); | 167 | int r = find(list, data); |
168 | 168 | ||
@@ -174,7 +174,7 @@ int bs_list_find(const BS_LIST *list, const void *data) | |||
174 | return list->ids[r]; | 174 | return list->ids[r]; |
175 | } | 175 | } |
176 | 176 | ||
177 | int bs_list_add(BS_LIST *list, const void *data, int id) | 177 | int bs_list_add(BS_LIST *list, const uint8_t *data, int id) |
178 | { | 178 | { |
179 | //find where the new element should be inserted | 179 | //find where the new element should be inserted |
180 | //see: return value of find() | 180 | //see: return value of find() |
@@ -214,7 +214,7 @@ int bs_list_add(BS_LIST *list, const void *data, int id) | |||
214 | return 1; | 214 | return 1; |
215 | } | 215 | } |
216 | 216 | ||
217 | int bs_list_remove(BS_LIST *list, const void *data, int id) | 217 | int bs_list_remove(BS_LIST *list, const uint8_t *data, int id) |
218 | { | 218 | { |
219 | int i = find(list, data); | 219 | int i = find(list, data); |
220 | 220 | ||