From 1b902d62671e2a1ca0561f46ace6bc45d6e0a2a3 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 24 May 2016 10:15:47 +0200
Subject: [PATCH] tweaks: elide unneeded intermediate assignments

---
 src/files.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/files.c b/src/files.c
index f38fa94e..c50a4fbc 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2422,9 +2422,8 @@ int do_writeout(bool exiting)
 			if (exiting || !openfile->mark_set)
 #endif
 			{
-			    i = do_yesno_prompt(FALSE,
-					_("Save file under DIFFERENT NAME? "));
-			    if (i < 1)
+			    if (do_yesno_prompt(FALSE, _("Save file under "
+					"DIFFERENT NAME? ")) < 1)
 				continue;
 			    maychange = TRUE;
 			}
@@ -2451,10 +2450,9 @@ int do_writeout(bool exiting)
 			(openfile->current_stat->st_mtime < st.st_mtime ||
 			openfile->current_stat->st_dev != st.st_dev ||
 			openfile->current_stat->st_ino != st.st_ino)) {
-		    i = do_yesno_prompt(FALSE,
-				_("File was modified since you opened it;"
-				  " continue saving? "));
-		    if (i == 0 || i == -1)
+
+		    if (do_yesno_prompt(FALSE, _("File was modified since "
+				"you opened it; continue saving? ")) < 1)
 			continue;
 		}
 #endif
-- 
GitLab