From c625ad7ea41123ad14f433fb569c5106645b6e82 Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Mon, 28 Aug 2023 10:49:50 -0400 Subject: [PATCH] tests: internal: stream_processor: use more succint check for TEST_CHECK. Signed-off-by: Phillip Whelan --- tests/internal/stream_processor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/internal/stream_processor.c b/tests/internal/stream_processor.c index 20edb74cdb9..64679027862 100644 --- a/tests/internal/stream_processor.c +++ b/tests/internal/stream_processor.c @@ -531,9 +531,7 @@ static void test_window() for (t = 0; t < check->window_size_sec + check->window_hop_sec; t++) { ret = snprintf(datafile, sizeof(datafile)-1, "%s%d.mp", DATA_SAMPLES_HOPPING_WINDOW_PATH, t + 1); - TEST_CHECK(ret <= sizeof(datafile)-1); - - if (ret > sizeof(datafile)-1) { + if (!TEST_CHECK(ret <= sizeof(datafile)-1)) { exit(1); } ret = file_to_buf(datafile, &data_buf); @@ -674,9 +672,7 @@ static void test_snapshot() ret = snprintf(datafile, sizeof(datafile)-1, "%s%d.mp", DATA_SAMPLES_HOPPING_WINDOW_PATH, t + 1); - TEST_CHECK(ret <= sizeof(datafile)-1); - - if (ret > sizeof(datafile)-1) { + if (!TEST_CHECK(ret <= sizeof(datafile)-1)) { exit(1); }