mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
fix misuse of return value
This commit is contained in:
parent
2c2b2717eb
commit
5f931138d2
1 changed files with 1 additions and 5 deletions
|
|
@ -72,7 +72,6 @@ int main(int argc, char*argv[]) {
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
uint8_t buf[BUFSIZE];
|
uint8_t buf[BUFSIZE];
|
||||||
ssize_t r;
|
|
||||||
|
|
||||||
/* Record some data ... */
|
/* Record some data ... */
|
||||||
if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) {
|
if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) {
|
||||||
|
|
@ -80,11 +79,8 @@ int main(int argc, char*argv[]) {
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* And write it to STDOUT */
|
/* 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));
|
fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue