From 96fa87086dc5624eb4646ba126152c2e9e5b1257 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 30 Oct 2012 20:28:24 +0530 Subject: [PATCH] tests: Minor alignment adjustment fix for cpu-test --- src/tests/cpu-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c index 8f6f936a4..8e196e5bf 100644 --- a/src/tests/cpu-test.c +++ b/src/tests/cpu-test.c @@ -83,7 +83,8 @@ static void run_volume_test(pa_do_volume_func_t func, pa_do_volume_func_t orig_f samples_ref = s_ref + (8 - align); samples_orig = s_orig + (8 - align); nsamples = SAMPLES - (8 - align); - nsamples += nsamples % channels; + if (nsamples % channels) + nsamples += nsamples % channels; size = nsamples * sizeof(*samples); pa_random(samples, size);