From 1df4452ff31ab8af5c9fa00e996b6356de4345fc Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 20 Sep 2023 21:35:55 +0300 Subject: [PATCH] server: properly delete output-stream files logic inversion --- lib/mu-server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mu-server.cc b/lib/mu-server.cc index 8ef1d5f0..932b5ab6 100644 --- a/lib/mu-server.cc +++ b/lib/mu-server.cc @@ -108,7 +108,7 @@ struct OutputStream { * longer needed. */ void unlink () { - if (!fname_.empty()) + if (fname_.empty()) return; if (auto&&res{::unlink(fname_.c_str())}; res != 0) mu_warning("failed to unlink '{}'", ::strerror(res)); @@ -707,7 +707,7 @@ Server::Private::output_results(const QueryResults& qres, size_t batch_size) con // structured bindings / lambda don't work with some clang. mu_print(out, "("); - for(auto&& mi: qres) { + for (auto&& mi: qres) { auto msg{mi.message()}; if (!msg)