summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-03 18:29:49 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-03 18:29:49 +0200
commit5f931138d2445691e7e97d237e1db183d0dabfb7 (patch)
tree9b03c6c6c103b110161fc724b8c1da616e53328e
parent2c2b2717eb0e8d1831b498043e6995b477747e89 (diff)
fix misuse of return value
-rw-r--r--src/tests/parec-simple.c6
1 files changed, 1 insertions, 5 deletions
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;
}