]> sigrok.org Git - sigrok-cli.git/commitdiff
Fix session file loading.
authorBert Vermeulen <redacted>
Fri, 29 Aug 2014 21:02:19 +0000 (23:02 +0200)
committerBert Vermeulen <redacted>
Fri, 29 Aug 2014 21:02:19 +0000 (23:02 +0200)
input.c

diff --git a/input.c b/input.c
index c4f41bf4f57a9a1ea0b70dba02f484ee4c26a1b1..eb73d05d197b217b1cd717f878c1c4941685d376 100644 (file)
--- a/input.c
+++ b/input.c
@@ -143,7 +143,7 @@ void load_input_file(void)
        GSList *devices;
        int ret;
 
-       if (strcmp(opt_input_file, "-") || sr_session_load(opt_input_file, &session) == SR_OK) {
+       if (strcmp(opt_input_file, "-") && sr_session_load(opt_input_file, &session) == SR_OK) {
                /* sigrok session file */
                ret = sr_session_dev_list(session, &devices);
                if (ret != SR_OK || !devices->data) {
@@ -160,8 +160,7 @@ void load_input_file(void)
                sr_session_start(session);
                sr_session_run(session);
                sr_session_stop(session);
-       }
-       else {
+       } else {
                /* fall back on input modules */
                load_input_file_module();
        }