From 9188bb9ee9ba9e353228716ec726ace9f72b1e15 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 24 Jun 2016 15:46:53 -0700 Subject: [PATCH] Remove thread pointer checking. --- firmware/baseband/baseband_thread.cpp | 8 +++----- firmware/baseband/rssi_thread.cpp | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/firmware/baseband/baseband_thread.cpp b/firmware/baseband/baseband_thread.cpp index 6fc8a1534..27d4b033a 100644 --- a/firmware/baseband/baseband_thread.cpp +++ b/firmware/baseband/baseband_thread.cpp @@ -58,11 +58,9 @@ BasebandThread::BasebandThread(const tprio_t priority) { } BasebandThread::~BasebandThread() { - if( thread ) { - chThdTerminate(thread); - chThdWait(thread); - thread = nullptr; - } + chThdTerminate(thread); + chThdWait(thread); + thread = nullptr; } void BasebandThread::set_configuration(const BasebandConfiguration& new_configuration) { diff --git a/firmware/baseband/rssi_thread.cpp b/firmware/baseband/rssi_thread.cpp index 465e1d1f5..81be13ecd 100644 --- a/firmware/baseband/rssi_thread.cpp +++ b/firmware/baseband/rssi_thread.cpp @@ -40,11 +40,9 @@ RSSIThread::RSSIThread(const tprio_t priority) { } RSSIThread::~RSSIThread() { - if( thread ) { - chThdTerminate(thread); - chThdWait(thread); - thread = nullptr; - } + chThdTerminate(thread); + chThdWait(thread); + thread = nullptr; } void RSSIThread::run() {