summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-10-30 20:28:24 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-10-30 20:34:20 +0530
commit96fa87086dc5624eb4646ba126152c2e9e5b1257 (patch)
tree5b0a2a7841c956cd08f62757bc748cd23641aaef
parent0a8634f03e64a84f594bc8533235998e969eda66 (diff)
tests: Minor alignment adjustment fix for cpu-test
-rw-r--r--src/tests/cpu-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c
index 8f6f936a..8e196e5b 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);