]> git.wh0rd.org Git - nano.git/commitdiff
in do_writeout(), when setting retval to the return value of
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 11 Jan 2007 23:10:03 +0000 (23:10 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 11 Jan 2007 23:10:03 +0000 (23:10 +0000)
write_(marked_)?file(), use the "?" operator instead of an if/else
clause

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c

index acbb3820ddb2eb685f1806e7fc45cb9884cd5e0a..ea3c988e434eb3d123db73187a13e67f9db0b7e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,10 @@ CVS code -
          doc/man/Makefile.am, doc/man/fr/Makefile.am, and
          doc/texinfo/Makefile.am. (DLR)
 - files.c:
+  do_writeout()
+       - When setting retval to the return value of
+         write_(marked_)?file(), use the "?" operator instead of an
+         if/else clause. (DLR)
   is_dir()
        - Don't assign dirptr's value using buf until we've asserted
          that buf isn't NULL. (DLR)
index c0d08b7287b6e79200afd50f82d404141b451aff..b457689f4e4f4d3421c4e91942f9d856d368f6c4 100644 (file)
@@ -1941,16 +1941,16 @@ bool do_writeout(bool exiting)
            sunder(answer);
            align(&answer);
 
-#ifndef NANO_TINY
            /* Here's where we allow the selected text to be written to
             * a separate file.  If we're using restricted mode, this is
             * disabled, since it allows reading from or writing to
             * files not specified on the command line. */
-           if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
-               retval = write_marked_file(answer, NULL, FALSE, append);
-           else
+           retval =
+#ifndef NANO_TINY
+               (!ISSET(RESTRICTED) && !exiting && openfile->mark_set) ?
+               write_marked_file(answer, NULL, FALSE, append) :
 #endif
-               retval = write_file(answer, NULL, FALSE, append, FALSE);
+               write_file(answer, NULL, FALSE, append, FALSE);
 
            break;
        }