From 1207fd1f16ca880d56fb37f0b9116b903c5e423e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 22 Jun 2016 11:01:37 +0200 Subject: [PATCH] output/sndio: remove unnecessary initialization --- src/output/plugins/SndioOutputPlugin.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/output/plugins/SndioOutputPlugin.cxx b/src/output/plugins/SndioOutputPlugin.cxx index d3cfedcd6..b3f9f72d4 100644 --- a/src/output/plugins/SndioOutputPlugin.cxx +++ b/src/output/plugins/SndioOutputPlugin.cxx @@ -46,8 +46,7 @@ class SndioOutput { public: SndioOutput() - :base(sndio_output_plugin), - device(nullptr), sio_hdl(nullptr) {} + :base(sndio_output_plugin) {} ~SndioOutput() {} bool Configure(const ConfigBlock &block, Error &error); @@ -165,15 +164,13 @@ SndioOutput::Open(AudioFormat &audio_format, gcc_unused Error &error) return true; err: sio_close(sio_hdl); - sio_hdl = nullptr; return false; } void SndioOutput::Close() { - if (sio_hdl) - sio_close(sio_hdl); + sio_close(sio_hdl); delete timer; }