Commit 98a8c063 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Eliding an unneeded 'if'.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Showing with 2 additions and 4 deletions
+2 -4
......@@ -3,6 +3,7 @@
when they have the default cursor position (line 1, column 1).
* src/files.c (write_file): Avoid a pointless lstat() when not writing
to a temp file, and in the bargain elide two variables.
* src/files.c (write_file): Elide an unneeded 'if'.
2016-02-06 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (write_file): Remove the --nofollow option that hasn't
......
......@@ -1765,7 +1765,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
/* The status fields filled in by stat(). */
char *realname;
/* name after tilde expansion. */
FILE *f = NULL;
FILE *f = f_open;
/* The actual file, realname, we are writing to. */
char *tempname = NULL;
/* The name of the temporary file we write to on prepend. */
......@@ -1775,9 +1775,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
if (*name == '\0')
return -1;
if (f_open != NULL)
f = f_open;
if (!tmp)
titlebar(NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment