From 024c0304f1008a49f628ac8c4139ce56e1855c63 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 16 Oct 2019 14:57:33 +0100 Subject: [PATCH] Reverse the order of operands in an equals comparison to allow the compiler to catch a mistaken use of '=' instead of '=='. --- 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 dd988f9c..72a4fea6 100644 --- a/lib_xua/src/hid/hid.xc +++ b/lib_xua/src/hid/hid.xc @@ -177,7 +177,7 @@ static XUD_Result_t HidProcessSetIdleRequest( XUD_ep c_ep0_out, XUD_ep c_ep0_in, Any Interface value other than INTERFACE_NUMBER_HID indicates an error by the USB Host. */ - if(( 0U == reportId ) && ( interfaceNum == INTERFACE_NUMBER_HID )) { + if(( 0U == reportId ) && ( INTERFACE_NUMBER_HID == interfaceNum )) { s_hidIdleActive = (( 0U == duration ) || ( ENDPOINT_INT_INTERVAL_IN_HID < duration )); if( s_hidIdleActive ) {