[USBPORT] Use min() macro.
authorVadim Galyant <vgal@rambler.ru>
Wed, 10 Jan 2018 16:31:47 +0000 (01:31 +0900)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:57 +0000 (19:35 +0100)
drivers/usb/usbport/endpoint.c

index 8bf9ca9..e599e87 100644 (file)
@@ -107,10 +107,7 @@ USBPORT_AllocateBandwidth(IN PDEVICE_OBJECT FdoDevice,
 
         for (ix = 1; *Bandwidth >= EndpointBandwidth; ix++)
         {
 
         for (ix = 1; *Bandwidth >= EndpointBandwidth; ix++)
         {
-            if (MinBandwidth > *Bandwidth)
-            {
-                MinBandwidth = *Bandwidth;
-            }
+            MinBandwidth = min(MinBandwidth, *Bandwidth); 
 
             Bandwidth++;
 
 
             Bandwidth++;