diff --git a/lib/include/srsran/adt/circular_buffer.h b/lib/include/srsran/adt/circular_buffer.h index e23dca196..851366898 100644 --- a/lib/include/srsran/adt/circular_buffer.h +++ b/lib/include/srsran/adt/circular_buffer.h @@ -151,6 +151,7 @@ public: return false; } push(std::move(t)); + return true; } bool try_push(const T& t) @@ -159,6 +160,7 @@ public: return false; } push(t); + return true; } void pop() { @@ -180,7 +182,7 @@ public: void clear() { for (size_t i = 0; i < count; ++i) { - buffer[rpos + i].destroy(); + buffer[(rpos + i) % max_size()].destroy(); } count = 0; } diff --git a/lib/src/srslog/backend_worker.h b/lib/src/srslog/backend_worker.h index 641c024c2..e45786dab 100644 --- a/lib/src/srslog/backend_worker.h +++ b/lib/src/srslog/backend_worker.h @@ -32,7 +32,7 @@ class backend_worker static constexpr unsigned sleep_period_ms = 500; public: - explicit backend_worker(detail::work_queue& queue, detail::dyn_arg_store_pool& arg_pool) : + backend_worker(detail::work_queue& queue, detail::dyn_arg_store_pool& arg_pool) : queue(queue), arg_pool(arg_pool), running_flag(false) {}