Add necessary braces to if statements
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>
This commit is contained in:
parent
922e21a3ea
commit
dc85a189a4
@ -1055,11 +1055,12 @@ cant_access_acl:
|
|||||||
case GETACL:
|
case GETACL:
|
||||||
if (!aclbufp)
|
if (!aclbufp)
|
||||||
set_errno(EFAULT);
|
set_errno(EFAULT);
|
||||||
else
|
else {
|
||||||
res = getacl (get_stat_handle (), pc, nentries, aclbufp);
|
res = getacl (get_stat_handle (), pc, nentries, aclbufp);
|
||||||
/* For this ENOSYS case, see security.cc:get_file_attribute(). */
|
/* For this ENOSYS case, see security.cc:get_file_attribute(). */
|
||||||
if (res == -1 && get_errno () == ENOSYS)
|
if (res == -1 && get_errno () == ENOSYS)
|
||||||
goto cant_access_acl;
|
goto cant_access_acl;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GETACLCNT:
|
case GETACLCNT:
|
||||||
res = getacl (get_stat_handle (), pc, 0, NULL);
|
res = getacl (get_stat_handle (), pc, 0, NULL);
|
||||||
|
@ -1962,7 +1962,7 @@ dos_drive_mappings::dos_drive_mappings ()
|
|||||||
HANDLE sh = FindFirstVolumeW (vol, 64);
|
HANDLE sh = FindFirstVolumeW (vol, 64);
|
||||||
if (sh == INVALID_HANDLE_VALUE)
|
if (sh == INVALID_HANDLE_VALUE)
|
||||||
debug_printf ("FindFirstVolumeW, %E");
|
debug_printf ("FindFirstVolumeW, %E");
|
||||||
else
|
else {
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Skip drives which are not mounted. */
|
/* Skip drives which are not mounted. */
|
||||||
@ -2024,6 +2024,7 @@ dos_drive_mappings::dos_drive_mappings ()
|
|||||||
while (FindNextVolumeW (sh, vol, 64));
|
while (FindNextVolumeW (sh, vol, 64));
|
||||||
FindVolumeClose (sh);
|
FindVolumeClose (sh);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wchar_t *
|
wchar_t *
|
||||||
dos_drive_mappings::fixup_if_match (wchar_t *path)
|
dos_drive_mappings::fixup_if_match (wchar_t *path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user