projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ab88f25
)
[USBPORT] Use min(), max() macro.
author
Vadim Galyant
<vgal@rambler.ru>
Wed, 10 Jan 2018 17:01:21 +0000
(
02:01
+0900)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:58 +0000
(19:35 +0100)
drivers/usb/usbport/usb2.c
patch
|
blob
|
history
diff --git
a/drivers/usb/usbport/usb2.c
b/drivers/usb/usbport/usb2.c
index
6259cf4
..
92568f7
100644
(file)
--- 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;