]> sourceware.org Git - newlib-cygwin.git/commitdiff
Add necessary braces to if statements
authorPeter Foley <pefoley2@pefoley.com>
Sat, 19 Mar 2016 17:45:49 +0000 (13:45 -0400)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 20 Mar 2016 10:55:08 +0000 (11:55 +0100)
The missing braces cause only the first expression to be guarded by the
else clause.

winsup/cygwin/ChangeLog
* fhandler_disk_file.cc (facl): Add missing braces to if statement.
* mount.cc (dos_drive_mappings): Add missing braces to if statement.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/mount.cc

index 470dae872b6cdd619e67771c4ff7d08336746373..2cf738f6dcecabb23ebc6d6880dd3749fcea90d5 100644 (file)
@@ -1055,11 +1055,12 @@ cant_access_acl:
          case GETACL:
            if (!aclbufp)
              set_errno(EFAULT);
-           else
+           else {
              res = getacl (get_stat_handle (), pc, nentries, aclbufp);
              /* For this ENOSYS case, see security.cc:get_file_attribute(). */
              if (res == -1 && get_errno () == ENOSYS)
                goto cant_access_acl;
+            }
            break;
          case GETACLCNT:
            res = getacl (get_stat_handle (), pc, 0, NULL);
index ece8745fc7232b55a342736915398c1ebec198c0..22bc49c4a64d533ddaa2e404cd85eaa3f6a5660a 100644 (file)
@@ -1962,7 +1962,7 @@ dos_drive_mappings::dos_drive_mappings ()
   HANDLE sh = FindFirstVolumeW (vol, 64);
   if (sh == INVALID_HANDLE_VALUE)
     debug_printf ("FindFirstVolumeW, %E");
-  else
+  else {
     do
       {
        /* Skip drives which are not mounted. */
@@ -2023,6 +2023,7 @@ dos_drive_mappings::dos_drive_mappings ()
       }
     while (FindNextVolumeW (sh, vol, 64));
     FindVolumeClose (sh);
+  }
 }
 
 wchar_t *
This page took 0.03488 seconds and 5 git commands to generate.