Windows: add braces to case statements
authorPeter Scott <pscott@kerneldrivers.com>
Mon, 31 Oct 2011 21:59:51 +0000 (17:59 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 1 Nov 2011 14:48:58 +0000 (07:48 -0700)
A number of case statements did not have braces protecting
the block.  Add them.

Change-Id: I313462ca0c7490931e7c994ec45e39be071e782b
Reviewed-on: http://gerrit.openafs.org/5772
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSFSControl.cpp

index 7cf9da4..1c5a8cc 100644 (file)
@@ -818,7 +818,7 @@ AFSQueryDirectory( IN PIRP Irp)
                 //  Now fill the base parts of the structure that are applicable.
                 case FileIdBothDirectoryInformation:
                 case FileBothDirectoryInformation:
-
+                {
                     pBothDirInfo = (PFILE_BOTH_DIR_INFORMATION)&pBuffer[ ulNextEntry];
 
                     pBothDirInfo->ShortNameLength = (CHAR)pDirEntry->NameInformation.ShortNameLength;
@@ -829,14 +829,15 @@ AFSQueryDirectory( IN PIRP Irp)
                                        &pDirEntry->NameInformation.ShortName[ 0],
                                        pBothDirInfo->ShortNameLength);
                     }
+                }
                 case FileIdFullDirectoryInformation:
                 case FileFullDirectoryInformation:
-
+                {
                     pFullDirInfo = (PFILE_FULL_DIR_INFORMATION)&pBuffer[ ulNextEntry];
                     pFullDirInfo->EaSize = 0;
-
+                }
                 case FileDirectoryInformation:
-
+                {
                     pDirInfo = (PFILE_DIRECTORY_INFORMATION)&pBuffer[ ulNextEntry];
 
                     if( bUseFileInfo)
@@ -902,17 +903,18 @@ AFSQueryDirectory( IN PIRP Irp)
                     pDirInfo->FileNameLength = pDirEntry->NameInformation.FileName.Length;
 
                     break;
+                }
 
                 case FileNamesInformation:
-
+                {
                     pNamesInfo = (PFILE_NAMES_INFORMATION)&pBuffer[ ulNextEntry];
                     pNamesInfo->FileIndex = pDirEntry->FileIndex;
                     pNamesInfo->FileNameLength = pDirEntry->NameInformation.FileName.Length;
 
                     break;
-
+                }
                 default:
-
+                {
                     AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                                   AFS_TRACE_LEVEL_ERROR,
                                   "AFSQueryDirectory (%08lX) Unknown FileInformationClass %u\n",
@@ -924,6 +926,7 @@ AFSQueryDirectory( IN PIRP Irp)
                     try_return( ntStatus = STATUS_INVALID_INFO_CLASS);
 
                     break;
+                }
             }
 
             ulBytesConverted = ulBytesRemainingInBuffer - ulBaseLength >= pDirEntry->NameInformation.FileName.Length ?
index e9e2bd6..05cda83 100644 (file)
@@ -207,7 +207,7 @@ AFSProcessUserFsRequest( IN PIRP Irp)
             case FSCTL_OPLOCK_BREAK_NOTIFY:
             case FSCTL_OPLOCK_BREAK_ACK_NO_2:
             case FSCTL_REQUEST_FILTER_OPLOCK :
-
+            {
                 //
                 // Note that implementing this call will probably need us
                 // to call the server as well as adding code in read and
@@ -219,62 +219,70 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                 ntStatus = STATUS_NOT_IMPLEMENTED;
 
                 break;
+            }
 
             case FSCTL_LOCK_VOLUME:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_LOCK_VOLUME request\n");
 
                 break;
+            }
 
             case FSCTL_UNLOCK_VOLUME:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_UNLOCK_VOLUME request\n");
 
                 break;
+            }
 
             case FSCTL_DISMOUNT_VOLUME:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_DISMOUNT_VOLUME request\n");
 
                 break;
+            }
 
             case FSCTL_MARK_VOLUME_DIRTY:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_MARK_VOLUME_DIRTY request\n");
 
                 break;
+            }
 
             case FSCTL_IS_VOLUME_DIRTY:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_IS_VOLUME_DIRTY request\n");
 
                 break;
+            }
 
             case FSCTL_IS_VOLUME_MOUNTED:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_IS_VOLUME_MOUNTED request\n");
 
                 break;
+            }
 
             case FSCTL_IS_PATHNAME_VALID:
-
+            {
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_VERBOSE_2,
                               "AFSProcessUserFsRequest Processing FSCTL_IS_PATHNAME_VALID request\n");
 
                 break;
+            }
 
             case FSCTL_GET_REPARSE_POINT:
             {