From 431e165c85738667ec2bd03e3020d6c4e410d6e4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 13 Sep 2021 01:10:40 +0200 Subject: [PATCH] code cleanup --- src/tape.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tape.c b/src/tape.c index d7770329..69356b0b 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1579,15 +1579,13 @@ static int AutoPlayTapesExt(boolean initialize) { autoplay.tape_filename = global.autoplay_leveldir; + if (!fileExists(autoplay.tape_filename)) + Fail("tape file '%s' does not exist", autoplay.tape_filename); + LoadTapeFromFilename(autoplay.tape_filename); if (tape.no_valid_file) - { - if (!fileExists(autoplay.tape_filename)) - Fail("tape file '%s' does not exist", autoplay.tape_filename); - else - Fail("cannot load tape file '%s'", autoplay.tape_filename); - } + Fail("cannot load tape file '%s'", autoplay.tape_filename); if (tape.no_info_chunk) Fail("cannot get levelset from tape file '%s'", autoplay.tape_filename); -- 2.34.1