diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/channelmap-test.c | 4 | ||||
-rw-r--r-- | src/tests/parec-simple.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/channelmap-test.c b/src/tests/channelmap-test.c index 12b39f10..6cf58fb0 100644 --- a/src/tests/channelmap-test.c +++ b/src/tests/channelmap-test.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <assert.h> diff --git a/src/tests/parec-simple.c b/src/tests/parec-simple.c index 0312005d..c9d3bef5 100644 --- a/src/tests/parec-simple.c +++ b/src/tests/parec-simple.c @@ -72,7 +72,6 @@ int main(int argc, char*argv[]) { for (;;) { uint8_t buf[BUFSIZE]; - ssize_t r; /* Record some data ... */ if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) { @@ -80,11 +79,8 @@ int main(int argc, char*argv[]) { goto finish; } - if (r == 0) - break; - /* And write it to STDOUT */ - if ((r = loop_write(STDOUT_FILENO, buf, sizeof(buf))) <= 0) { + if (loop_write(STDOUT_FILENO, buf, sizeof(buf)) != sizeof(buf)) { fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno)); goto finish; } |