dplayx: Indentation fix

Andrew Talbot andrew.talbot at talbotville.com
Mon May 26 10:23:42 CDT 2008


Changelog:
    dplayx: Indentation fix.

diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 3623453..82a38ea 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -2221,32 +2221,32 @@ static HRESULT WINAPI DP_IF_EnumSessions
    * contains the possible SPs. These dialog boxes most likely follow SDK
    * examples.
    */
-   if( This->dp2->bDPLSPInitialized && !This->dp2->bSPInitialized )
-   {
-     LPVOID lpConnection;
-     DWORD  dwSize;
-
-     WARN( "Hack providing TCP/IP SP for lobby provider activated\n" );
-
-     if( !DP_BuildSPCompoundAddr( (LPGUID)&DPSPGUID_TCPIP, &lpConnection, &dwSize ) )
-     {
-       ERR( "Can't build compound addr\n" );
-       return DPERR_GENERIC;
-     }
-
-     hr = DP_IF_InitializeConnection( (IDirectPlay3Impl*)This, lpConnection,
-                                      0, bAnsi );
-     if( FAILED(hr) )
-     {
-       return hr;
-     }
-
-     /* Free up the address buffer */
-     HeapFree( GetProcessHeap(), 0, lpConnection );
-
-     /* The SP is now initialized */
-     This->dp2->bSPInitialized = TRUE;
-   }
+  if( This->dp2->bDPLSPInitialized && !This->dp2->bSPInitialized )
+  {
+    LPVOID lpConnection;
+    DWORD  dwSize;
+
+    WARN( "Hack providing TCP/IP SP for lobby provider activated\n" );
+
+    if( !DP_BuildSPCompoundAddr( (LPGUID)&DPSPGUID_TCPIP, &lpConnection, &dwSize ) )
+    {
+      ERR( "Can't build compound addr\n" );
+      return DPERR_GENERIC;
+    }
+
+    hr = DP_IF_InitializeConnection( (IDirectPlay3Impl*)This, lpConnection,
+                                     0, bAnsi );
+    if( FAILED(hr) )
+    {
+      return hr;
+    }
+
+    /* Free up the address buffer */
+    HeapFree( GetProcessHeap(), 0, lpConnection );
+
+    /* The SP is now initialized */
+    This->dp2->bSPInitialized = TRUE;
+  }
 #endif
 
 
@@ -5322,14 +5322,14 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
 	    if (!lpEnumCallbackW(&serviceProviderGUID, descriptionW, 6, 0, lpContext))
 		goto end;
 	}
-      
+
       dwIndex++;
-  }
+    }
 
  end:
     HeapFree(GetProcessHeap(), 0, descriptionA);
     HeapFree(GetProcessHeap(), 0, descriptionW);
-    
+
     return DP_OK;
 }
 
diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c
index f78d657..0164c32 100644
--- a/dlls/dplayx/dplobby.c
+++ b/dlls/dplayx/dplobby.c
@@ -745,97 +745,97 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes
     return DPERR_INVALIDOBJECT;
   }
 
-    /* Need to loop over the service providers in the registry */
-    if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
-                         0, KEY_READ, &hkResult ) != ERROR_SUCCESS )
+  /* Need to loop over the service providers in the registry */
+  if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
+                       0, KEY_READ, &hkResult ) != ERROR_SUCCESS )
+  {
+    /* Hmmm. Does this mean that there are no service providers? */
+    ERR(": no service providers?\n");
+    return DP_OK;
+  }
+
+  /* Traverse all the service providers we have available */
+  for( dwIndex=0;
+       RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
+                      NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
+       ++dwIndex, sizeOfSubKeyName=50 )
+  {
+
+    HKEY     hkServiceProvider, hkServiceProviderAt;
+    GUID     serviceProviderGUID;
+    DWORD    returnTypeGUID, sizeOfReturnBuffer = 50;
+    char     atSubKey[51];
+    char     returnBuffer[51];
+    WCHAR    buff[51];
+    DWORD    dwAtIndex;
+    LPCSTR   atKey = "Address Types";
+    LPCSTR   guidDataSubKey   = "Guid";
+    FILETIME filetime;
+
+
+    TRACE(" this time through: %s\n", subKeyName );
+
+    /* Get a handle for this particular service provider */
+    if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ,
+                       &hkServiceProvider ) != ERROR_SUCCESS )
     {
-      /* Hmmm. Does this mean that there are no service providers? */
-      ERR(": no service providers?\n");
-      return DP_OK;
+       ERR(": what the heck is going on?\n" );
+       continue;
     }
 
-    /* Traverse all the service providers we have available */
-    for( dwIndex=0;
-         RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
-                        NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
-         ++dwIndex, sizeOfSubKeyName=50 )
+    if( RegQueryValueExA( hkServiceProvider, guidDataSubKey,
+                          NULL, &returnTypeGUID, (LPBYTE)returnBuffer,
+                          &sizeOfReturnBuffer ) != ERROR_SUCCESS )
     {
+      ERR(": missing GUID registry data members\n" );
+      continue;
+    }
 
-      HKEY     hkServiceProvider, hkServiceProviderAt;
-      GUID     serviceProviderGUID;
-      DWORD    returnTypeGUID, sizeOfReturnBuffer = 50;
-      char     atSubKey[51];
-      char     returnBuffer[51];
-      WCHAR    buff[51];
-      DWORD    dwAtIndex;
-      LPCSTR   atKey = "Address Types";
-      LPCSTR   guidDataSubKey   = "Guid";
-      FILETIME filetime;
-
+    /* FIXME: Check return types to ensure we're interpreting data right */
+    MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
+    CLSIDFromString( buff, &serviceProviderGUID );
+    /* FIXME: Have I got a memory leak on the serviceProviderGUID? */
 
-      TRACE(" this time through: %s\n", subKeyName );
+    /* Determine if this is the Service Provider that the user asked for */
+    if( !IsEqualGUID( &serviceProviderGUID, guidSP ) )
+    {
+      continue;
+    }
 
-      /* Get a handle for this particular service provider */
-      if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ,
-                         &hkServiceProvider ) != ERROR_SUCCESS )
-      {
-         ERR(": what the heck is going on?\n" );
-         continue;
-      }
+    /* Get a handle for this particular service provider */
+    if( RegOpenKeyExA( hkServiceProvider, atKey, 0, KEY_READ,
+                       &hkServiceProviderAt ) != ERROR_SUCCESS )
+    {
+      TRACE(": No Address Types registry data sub key/members\n" );
+      break;
+    }
 
-      if( RegQueryValueExA( hkServiceProvider, guidDataSubKey,
-                            NULL, &returnTypeGUID, (LPBYTE)returnBuffer,
-                            &sizeOfReturnBuffer ) != ERROR_SUCCESS )
-      {
-        ERR(": missing GUID registry data members\n" );
-        continue;
-      }
+    /* Traverse all the address type we have available */
+    for( dwAtIndex=0;
+         RegEnumKeyExA( hkServiceProviderAt, dwAtIndex, atSubKey, &sizeOfSubKeyName,
+                        NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
+         ++dwAtIndex, sizeOfSubKeyName=50 )
+    {
+      TRACE( "Found Address Type GUID %s\n", atSubKey );
 
       /* FIXME: Check return types to ensure we're interpreting data right */
-      MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
+      MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) );
       CLSIDFromString( buff, &serviceProviderGUID );
       /* FIXME: Have I got a memory leak on the serviceProviderGUID? */
 
-      /* Determine if this is the Service Provider that the user asked for */
-      if( !IsEqualGUID( &serviceProviderGUID, guidSP ) )
-      {
-        continue;
-      }
-
-      /* Get a handle for this particular service provider */
-      if( RegOpenKeyExA( hkServiceProvider, atKey, 0, KEY_READ,
-                         &hkServiceProviderAt ) != ERROR_SUCCESS )
-      {
-        TRACE(": No Address Types registry data sub key/members\n" );
-        break;
-      }
-
-      /* Traverse all the address type we have available */
-      for( dwAtIndex=0;
-           RegEnumKeyExA( hkServiceProviderAt, dwAtIndex, atSubKey, &sizeOfSubKeyName,
-                          NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS;
-           ++dwAtIndex, sizeOfSubKeyName=50 )
+      /* The enumeration will return FALSE if we are not to continue */
+      if( !lpEnumAddressTypeCallback( &serviceProviderGUID, lpContext, 0 ) )
       {
-        TRACE( "Found Address Type GUID %s\n", atSubKey );
-
-        /* FIXME: Check return types to ensure we're interpreting data right */
-        MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) );
-        CLSIDFromString( buff, &serviceProviderGUID );
-        /* FIXME: Have I got a memory leak on the serviceProviderGUID? */
-
-        /* The enumeration will return FALSE if we are not to continue */
-        if( !lpEnumAddressTypeCallback( &serviceProviderGUID, lpContext, 0 ) )
-        {
-           WARN("lpEnumCallback returning FALSE\n" );
-           break; /* FIXME: This most likely has to break from the procedure...*/
-        }
-
+         WARN("lpEnumCallback returning FALSE\n" );
+         break; /* FIXME: This most likely has to break from the procedure...*/
       }
 
-      /* We only enumerate address types for 1 GUID. We've found it, so quit looking */
-      break;
     }
 
+    /* We only enumerate address types for 1 GUID. We've found it, so quit looking */
+    break;
+  }
+
   return DP_OK;
 }
 



More information about the wine-patches mailing list