[Wine-patches] [eterwine 2/2] mountmgr: Fix some regressions.

Alexander Morozov amorozov на etersoft.ru
Вт Май 15 18:28:47 MSK 2012


---
 dlls/mountmgr.sys/usbhub.c |   23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/dlls/mountmgr.sys/usbhub.c b/dlls/mountmgr.sys/usbhub.c
index 533c298..ed4951e 100644
--- a/dlls/mountmgr.sys/usbhub.c
+++ b/dlls/mountmgr.sys/usbhub.c
@@ -263,12 +263,9 @@ static NTSTATUS get_node_conn_info( struct DeviceInstance *inst, void *buff,
                     conn_info->CurrentConfigurationValue = config;
                 libusb_close( husb );
             }
-            if (!ret)
-            {
-                conn_info->ConnectionStatus = 1;
-                *outsize = sizeof(*conn_info);
-                status = STATUS_SUCCESS;
-            }
+            conn_info->ConnectionStatus = 1;
+            *outsize = sizeof(*conn_info);
+            status = STATUS_SUCCESS;
             break;
         }
     }
@@ -295,24 +292,20 @@ static NTSTATUS get_node_conn_info( struct DeviceInstance *inst, void *buff,
         if (++index == conn_info->ConnectionIndex)
         {
             usb_dev_handle *husb;
-            int ret = -1;
 
             memcpy( &conn_info->DeviceDescriptor, &dev->descriptor,
                     sizeof(USB_DEVICE_DESCRIPTOR) );
             husb = usb_open( inst->dev );
             if (husb)
             {
-                ret = usb_control_msg( husb, 1 << 7, USB_REQ_GET_CONFIGURATION,
+                usb_control_msg( husb, 1 << 7, USB_REQ_GET_CONFIGURATION,
                         0, 0, (char *)&conn_info->CurrentConfigurationValue,
                         sizeof(UCHAR), 0 );
                 usb_close( husb );
             }
-            if (ret >= 0)
-            {
-                conn_info->ConnectionStatus = 1;
-                *outsize = sizeof(*conn_info);
-                status = STATUS_SUCCESS;
-            }
+            conn_info->ConnectionStatus = 1;
+            *outsize = sizeof(*conn_info);
+            status = STATUS_SUCCESS;
             break;
         }
     return status;
@@ -1210,7 +1203,7 @@ static NTSTATUS WINAPI usbhub_dispatch_pnp( DEVICE_OBJECT *device, IRP *irp )
                                        'V','i','d','_','%','0','4','x','&',
                                        'P','i','d','_','%','0','4','x',0};
     static const WCHAR root_hub_idW[] = {'U','S','B','\\',
-                                         'R','O','O','T','_','H','U','B',0};
+                                         'R','O','O','T','_','H','U','B','\\',0};
 
     struct PdoExtension *dx;
     IO_STACK_LOCATION *irpsp;
-- 
1.7.9.7



Подробная информация о списке рассылки Wine-patches