From a9a653791220325f59f1d18ea0dbe3101f7d6829 Mon Sep 17 00:00:00 2001 From: "Pocze Bence (XC/ENG4-Bp)" Date: Mon, 21 Feb 2022 10:07:27 +0100 Subject: [PATCH] break on compress failure --- src/compress_measurements.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compress_measurements.cpp b/src/compress_measurements.cpp index e84b15c..ef6271d 100644 --- a/src/compress_measurements.cpp +++ b/src/compress_measurements.cpp @@ -44,10 +44,13 @@ int main(int argc, char *argv[]) if (std::fclose(outfile)) { - std::cout << " FAILED!" << std::endl - << std::flush; fprintf(stderr, "Write error: %s\n", std::strerror(errno)); success = false; + } + + if (!success) { + std::cout << " FAILED!" << std::endl + << std::flush; break; }