diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-07 21:40:17 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-08 19:03:52 +0000 |
commit | 2b49f803959cf47f81d1b49032f7c6f30ccc37f7 (patch) | |
tree | de26ad6da901c7d951e66745ee80545b71300abb /toxcore/ping_array.c | |
parent | ebdc43285a4fdf1f9d76f8839a9ba572a35cbb80 (diff) |
Rename `BS_LIST` to `BS_List` to follow the naming conventions.
`BS_LIST` would be a constant. `BS_List` is a type name.
Diffstat (limited to 'toxcore/ping_array.c')
-rw-r--r-- | toxcore/ping_array.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toxcore/ping_array.c b/toxcore/ping_array.c index bcab9fe2..ded3ed3a 100644 --- a/toxcore/ping_array.c +++ b/toxcore/ping_array.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "util.h" | 34 | #include "util.h" |
35 | 35 | ||
36 | 36 | ||
37 | typedef struct { | 37 | typedef struct Ping_Array_Entry { |
38 | void *data; | 38 | void *data; |
39 | uint32_t length; | 39 | uint32_t length; |
40 | uint64_t time; | 40 | uint64_t time; |
@@ -76,7 +76,8 @@ Ping_Array *ping_array_new(uint32_t size, uint32_t timeout) | |||
76 | return nullptr; | 76 | return nullptr; |
77 | } | 77 | } |
78 | 78 | ||
79 | empty_array->last_deleted = empty_array->last_added = 0; | 79 | empty_array->last_deleted = 0; |
80 | empty_array->last_added = 0; | ||
80 | empty_array->total_size = size; | 81 | empty_array->total_size = size; |
81 | empty_array->timeout = timeout; | 82 | empty_array->timeout = timeout; |
82 | return empty_array; | 83 | return empty_array; |
@@ -86,9 +87,9 @@ static void clear_entry(Ping_Array *array, uint32_t index) | |||
86 | { | 87 | { |
87 | free(array->entries[index].data); | 88 | free(array->entries[index].data); |
88 | array->entries[index].data = nullptr; | 89 | array->entries[index].data = nullptr; |
89 | array->entries[index].length = | 90 | array->entries[index].length = 0; |
90 | array->entries[index].time = | 91 | array->entries[index].time = 0; |
91 | array->entries[index].ping_id = 0; | 92 | array->entries[index].ping_id = 0; |
92 | } | 93 | } |
93 | 94 | ||
94 | /* Free all the allocated memory in a Ping_Array. | 95 | /* Free all the allocated memory in a Ping_Array. |