From 99e6293cd01f248f364cd28fa1cc5afcbd136576 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@justemail.net> Date: Mon, 23 May 2016 20:57:08 +0200 Subject: [PATCH] tweaks: remove an unnecessary intermediate assignment --- src/files.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/files.c b/src/files.c index e01939b1..a762a0df 100644 --- a/src/files.c +++ b/src/files.c @@ -2243,11 +2243,10 @@ int do_writeout(bool exiting) /* Whether it's okay to save the file under a different name. */ bool result = FALSE; - if (exiting && openfile->filename[0] != '\0' && ISSET(TEMP_FILE)) { - result = write_file(openfile->filename, NULL, FALSE, OVERWRITE, FALSE); - - if (result) - return 1; /* The write succeeded. */ + if (exiting && ISSET(TEMP_FILE) && openfile->filename[0] != '\0') { + if (write_file(openfile->filename, NULL, FALSE, OVERWRITE, FALSE)) + return 1; + /* If writing the file failed, go on to prompt for a new name. */ } given = mallocstrcpy(NULL, -- GitLab