From: Karel Zak Date: Fri, 28 Jun 2019 08:00:53 +0000 (+0200) Subject: scriptreplay: check for EOF X-Git-Tag: v2.35-rc1~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f923a595962786ed20c455ed4e18f79d242b897e;p=thirdparty%2Futil-linux.git scriptreplay: check for EOF Signed-off-by: Karel Zak --- diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index 78e2daa4d8..1aaf6753bb 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -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));