]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
scriptreplay: check for EOF
authorKarel Zak <kzak@redhat.com>
Fri, 28 Jun 2019 08:00:53 +0000 (10:00 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Oct 2019 11:11:53 +0000 (13:11 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/scriptreplay.c

index 78e2daa4d88ce2b537d4d93559ed238493374ef3..1aaf6753bbb446b5c81f761df0cb8793d4dd5de5 100644 (file)
@@ -377,8 +377,11 @@ static int replay_get_next_step(struct replay_setup *stp, char *streams, struct
                        break;
                }
 
-               if (rc)
-                       break;;         /* error */
+               if (rc) {
+                       if (rc < 0 && feof(stp->timing_fp))
+                               rc = 1;
+                       break;          /* error or EOF */
+               }
 
                DBG(TIMING, ul_debug(" step entry is '%c'", step->type));