From b3d66aab3df9dd4243aeafc6665229da37981d53 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 18 Apr 2007 19:25:00 +0000
Subject: [PATCH] another cosmetic fix

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/files.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/files.c b/src/files.c
index 6eaee408..1b02c477 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1904,10 +1904,12 @@ bool do_writeout(bool exiting)
 		full_filename = get_full_path(openfile->filename);
 		name_exists = (stat((full_answer == NULL) ? answer :
 			full_answer, &st) != -1);
-		do_warning = ((openfile->filename[0] == '\0' &&
-			name_exists) || (strcmp((full_answer == NULL) ?
+		if (openfile->filename[0] == '\0')
+		    do_warning = name_exists;
+		else
+		    do_warning = (strcmp((full_answer == NULL) ?
 			answer : full_answer, (full_filename == NULL) ?
-			openfile->filename : full_filename) != 0));
+			openfile->filename : full_filename) != 0);
 
 		/* Convert nulls to newlines.  answer_len is the
 		 * string's real length. */
-- 
GitLab