]> git.wh0rd.org Git - nano.git/commitdiff
Readjusting the indentation and a comment.
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 20 Jan 2016 15:33:41 +0000 (15:33 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Wed, 20 Jan 2016 15:33:41 +0000 (15:33 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c

index 81f4f56651f747fe53cd3c8e0cbd44df9e840654..b4b6bba21da1b00d58dbdf9670d18607b3779944 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-01-20  Benno Schulenberg  <bensberg@justemail.net>
+       * src/files.c (open_buffer): Readjust the indentation and a comment.
+
 2016-01-20  Rishabh Dave  <rishabhddave@gmail.com>
        * src/files.c (verify_path, open_buffer): When opening a new buffer,
        verify that the containing directory of the given filename exists.
index 310c3000bc50254d90c87180a402c93a930c97e9..8a7a0812f1ff6f3d01d595730aceb2f7ad20ebd4 100644 (file)
@@ -400,29 +400,28 @@ bool open_buffer(const char *filename, bool undoable)
     }
 
     /* If we're going to load into a new buffer, first create the new
-     * buffer and lock the corresponding file. */
+     * buffer and (if possible) lock the corresponding file. */
     if (new_buffer) {
        make_new_buffer();
 
        verify_path(filename);
 
-       if (valid_path) {
 #ifndef NANO_TINY
-       if (ISSET(LOCKING) && filename[0] != '\0') {
-           int lockstatus = do_lockfile(filename);
-           if (lockstatus < 0) {
+       if (valid_path) {
+           if (ISSET(LOCKING) && filename[0] != '\0') {
+               int lockstatus = do_lockfile(filename);
+               if (lockstatus < 0) {
 #ifndef DISABLE_MULTIBUFFER
-               if (openfile->next) {
-                   close_buffer(TRUE);
-                   return FALSE;
-               }
+                   if (openfile->next) {
+                       close_buffer(TRUE);
+                       return FALSE;
+                   }
 #endif
-           } else if (lockstatus == 0) {
-               quiet = TRUE;
+               } else if (lockstatus == 0)
+                   quiet = TRUE;
            }
        }
-#endif
-       }
+#endif /* !NANO_TINY */
     }
 
     /* If the filename isn't blank, and we are not in NOREAD_MODE,