diff --git a/firmware/application/capture_thread.hpp b/firmware/application/capture_thread.hpp index 077731edd..d9977da07 100644 --- a/firmware/application/capture_thread.hpp +++ b/firmware/application/capture_thread.hpp @@ -38,8 +38,7 @@ using namespace hackrf::one; class StreamOutput { public: StreamOutput( - FIFO* const fifo - ) : fifo { fifo } + ) : fifo { reinterpret_cast*>(shared_memory.FIFO_HACK) } { } @@ -104,12 +103,7 @@ private: return false; } - auto fifo = reinterpret_cast*>(shared_memory.FIFO_HACK); - if( !fifo ) { - return false; - } - - StreamOutput stream { fifo }; + StreamOutput stream; while( !chThdShouldTerminate() ) { chEvtWaitAny(EVT_FIFO_HIGHWATER);