From 2b49f803959cf47f81d1b49032f7c6f30ccc37f7 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 7 Jul 2018 21:40:17 +0000 Subject: Rename `BS_LIST` to `BS_List` to follow the naming conventions. `BS_LIST` would be a constant. `BS_List` is a type name. --- toxcore/ping_array.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'toxcore/ping_array.c') 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 @@ #include "util.h" -typedef struct { +typedef struct Ping_Array_Entry { void *data; uint32_t length; uint64_t time; @@ -76,7 +76,8 @@ Ping_Array *ping_array_new(uint32_t size, uint32_t timeout) return nullptr; } - empty_array->last_deleted = empty_array->last_added = 0; + empty_array->last_deleted = 0; + empty_array->last_added = 0; empty_array->total_size = size; empty_array->timeout = timeout; return empty_array; @@ -86,9 +87,9 @@ static void clear_entry(Ping_Array *array, uint32_t index) { free(array->entries[index].data); array->entries[index].data = nullptr; - array->entries[index].length = - array->entries[index].time = - array->entries[index].ping_id = 0; + array->entries[index].length = 0; + array->entries[index].time = 0; + array->entries[index].ping_id = 0; } /* Free all the allocated memory in a Ping_Array. -- cgit v1.2.3