Change the representation, but not the logic, of a multi-part conditional expression to make it easier to understand.

This commit is contained in:
Michael Banther
2019-10-15 15:40:26 +01:00
parent a5f17c46fc
commit 5caca37177

View File

@@ -158,7 +158,7 @@ XUD_Result_t HidInterfaceClassRequests(
Any Interface value other than INTERFACE_NUMBER_HID indicates an error by the USB Host.
*/
if(( 0U == reportId ) && ( interfaceNum == INTERFACE_NUMBER_HID )) {
s_hidIdleActive = !(( 0 < duration ) && ( duration < ENDPOINT_INT_INTERVAL_IN_HID ));
s_hidIdleActive = (( 0U == duration ) || ( ENDPOINT_INT_INTERVAL_IN_HID < duration ));
if( s_hidIdleActive ) {
unsigned reportToSetIdleInterval = HidCalcReportToSetIdleInterval( s_hidReportTime );