nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 99e6293cd01f248f364cd28fa1cc5afcbd136576
parent 286b6a90881662f3b0914095c9b37c6d3698a857
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Mon, 23 May 2016 20:57:08 +0200

tweaks: remove an unnecessary intermediate assignment

Diffstat:
Msrc/files.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 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,