From 2a7d876f7c3d17dd886a7da7ceee944271e63eab Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 20 Jun 2019 09:50:14 +0200 Subject: [PATCH] test-cmp: fix initialisation order --- src/villas-test-cmp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/villas-test-cmp.cpp b/src/villas-test-cmp.cpp index 8700cbfad..fdd7544e7 100644 --- a/src/villas-test-cmp.cpp +++ b/src/villas-test-cmp.cpp @@ -218,15 +218,15 @@ check: if (optarg == endptr) if (!fmt) throw RuntimeError("Invalid IO format: {}", format); + ret = pool_init(&pool, filenames.size(), SAMPLE_LENGTH(DEFAULT_SAMPLE_LENGTH), &memory_heap); + if (ret) + throw RuntimeError("Failed to initialize pool"); + /* Open files */ std::vector sides; for (auto filename : filenames) sides.push_back(new TestCmpSide(filename, fmt, dtypes, &pool)); - ret = pool_init(&pool, sides.size(), SAMPLE_LENGTH(DEFAULT_SAMPLE_LENGTH), &memory_heap); - if (ret) - throw RuntimeError("Failed to initialize pool"); - line = 0; for (;;) { /* Read next sample from all files */