aboutsummaryrefslogtreecommitdiffstats
path: root/binding/rtl_fm_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/rtl_fm_helper.c')
-rw-r--r--binding/rtl_fm_helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binding/rtl_fm_helper.c b/binding/rtl_fm_helper.c
index 9405ae2..c7df4b9 100644
--- a/binding/rtl_fm_helper.c
+++ b/binding/rtl_fm_helper.c
@@ -175,7 +175,8 @@ int main(int argc, char *argv[])
while(!done) {
LOG("Reading command\n");
- fgets(line, sizeof(line), stdin);
+ if (fgets(line, sizeof(line), stdin) == NULL)
+ break;
if(line[0] == '\0' || line[0] == '\n')
continue;
if(strcmp(line, "START\n") == 0) {