[pulseaudio-discuss] [PATCH 4/8] tests: Assert fillrate > 0 in alsa-time-test

Peter Meerwald pmeerw at pmeerw.net
Mon Sep 14 09:07:45 PDT 2015


From: Peter Meerwald <p.meerwald at bct-electronic.com>

CID 1323592

assert that fillrate is strictly positive
---
 src/tests/alsa-time-test.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c
index b4eedab..a877cb8 100644
--- a/src/tests/alsa-time-test.c
+++ b/src/tests/alsa-time-test.c
@@ -60,6 +60,7 @@ int main(int argc, char *argv[]) {
     dev = argc > 1 ? argv[1] : "front:0";
     cap = argc > 2 ? atoi(argv[2]) : 0;
     fillrate = argc > 3 ? atoi(argv[3]) : 1;
+    assert(fillrate > 0);
 
     samples = calloc(fillrate, CHANNELS*sizeof(uint16_t));
     assert(samples);
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list