X-Git-Url: https://git.kernelconcepts.de/?p=rdstmc.git;a=blobdiff_plain;f=decoder%2Frds.c;fp=decoder%2Frds.c;h=bdaee7b9fe76ff0f8e2bb75da20a704a3a18f3d0;hp=27a417c49398053184b816b084fd72c8695d0b37;hb=d4f8c46bc4a5cad443611ac86bfe0a83a9d1b49b;hpb=676e37ddd2faa27593615e47d42a50446bf10fac diff --git a/decoder/rds.c b/decoder/rds.c index 27a417c..bdaee7b 100644 --- a/decoder/rds.c +++ b/decoder/rds.c @@ -95,9 +95,11 @@ unsigned char offset; rb = read(rds_fd, rbuf, 3); if (rb <= 0) - exit(0); // just for testing - if (rb != 3) + return 0; + if (rb != 3) { printf("#read err rb=%d\n", rb); + return 0; + } block = rbuf[0] | (rbuf[1] << 8); offset = rbuf[2] & 0x07; @@ -124,6 +126,7 @@ unsigned char offset; } if (OutputFlags & RDS_RECEIVE_INDICATOR) printf("."); + return 0; }