From 3d12f8d2466d6a000bb116b4363a695c862ab52d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 21:38:07 +0200 Subject: UriUtil: uri_remove_auth() returns std::string --- src/DecoderThread.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/DecoderThread.cxx') diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx index b3f0e6f36..3364f23b3 100644 --- a/src/DecoderThread.cxx +++ b/src/DecoderThread.cxx @@ -38,8 +38,6 @@ #include "tag/ApeReplayGain.hxx" #include "Log.hxx" -#include - static constexpr Domain decoder_thread_domain("decoder_thread"); /** @@ -367,13 +365,12 @@ decoder_run_song(decoder_control &dc, dc.state = DecoderState::ERROR; const char *error_uri = song->uri; - char *allocated = uri_remove_auth(error_uri); - if (allocated != nullptr) - error_uri = allocated; + const std::string allocated = uri_remove_auth(error_uri); + if (!allocated.empty()) + error_uri = allocated.c_str(); dc.error.Format(decoder_domain, "Failed to decode %s", error_uri); - g_free(allocated); } dc.client_cond.signal(); -- cgit v1.2.3