]> sigrok.org Git - sigrok-cli.git/blobdiff - anykey.c
Refactor main source into separate files
[sigrok-cli.git] / anykey.c
index cc40bedb7947a68d4bfde261106fdfc6d28e98f7..24970c2c299a26733dc754a34a3c586925367be5 100644 (file)
--- a/anykey.c
+++ b/anykey.c
@@ -1,5 +1,5 @@
 /*
 /*
- * This file is part of the sigrok project.
+ * This file is part of the sigrok-cli project.
  *
  * Copyright (C) 2011 Bert Vermeulen <bert@biot.com>
  *
  *
  * Copyright (C) 2011 Bert Vermeulen <bert@biot.com>
  *
@@ -38,11 +38,11 @@ static struct termios term_orig;
 
 static int received_anykey(int fd, int revents, void *cb_data)
 {
 
 static int received_anykey(int fd, int revents, void *cb_data)
 {
-       /* Avoid compiler warnings. */
        (void)fd;
        (void)revents;
        (void)cb_data;
 
        (void)fd;
        (void)revents;
        (void)cb_data;
 
+       sr_session_source_remove(STDIN_FILENO);
        sr_session_stop();
 
        return TRUE;
        sr_session_stop();
 
        return TRUE;