From 5caca37177cfc34e88f1b903f196dcbc9ff3f705 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Tue, 15 Oct 2019 15:40:26 +0100 Subject: [PATCH] Change the representation, but not the logic, of a multi-part conditional expression to make it easier to understand. --- lib_xua/src/hid/hid.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/hid/hid.xc b/lib_xua/src/hid/hid.xc index 40014575..cee8d49a 100644 --- a/lib_xua/src/hid/hid.xc +++ b/lib_xua/src/hid/hid.xc @@ -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 );