https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dd1297f0d0f47a6f1ac8a…
commit dd1297f0d0f47a6f1ac8a894b283308b7ecc9874
Author: Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Thu Jan 11 02:01:21 2018 +0900
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:58 2018 +0100
[USBPORT] Use min(), max() macro.
---
drivers/usb/usbport/usb2.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c
index 6259cf487e..92568f7e48 100644
--- a/drivers/usb/usbport/usb2.c
+++ b/drivers/usb/usbport/usb2.c
@@ -1821,11 +1821,8 @@ USBPORT_UpdateAllocatedBwTt(IN PUSB2_TT_EXTENSION TtExtension)
{
NewBusBandwidth = BusBandwidth - TtExtension->Bandwidth[ix];
- if (NewBusBandwidth > MaxBusBandwidth)
- MaxBusBandwidth = NewBusBandwidth;
-
- if (NewBusBandwidth < MinBusBandwidth)
- MinBusBandwidth = NewBusBandwidth;
+ MaxBusBandwidth = max(MaxBusBandwidth, NewBusBandwidth);
+ MinBusBandwidth = min(MinBusBandwidth, NewBusBandwidth);
}
TtExtension->MaxBandwidth = MaxBusBandwidth;