staging: r8188eu: rewrite subtraction in core/rtw_cmd.c
authorMichael Straube <straube.linux@gmail.com>
Mon, 16 Aug 2021 15:57:57 +0000 (17:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Aug 2021 17:56:04 +0000 (19:56 +0200)
Rewrite subtraction in core/rtw_cmd.c to clear missing spaces around
operator reported by checkpatch.

256-1 -> 255

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210816155818.24005-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_cmd.c

index e95cb27516b0cdd8571116971555980f4aa67e37..ff6c5fa7110110574829762611a61c7d75090ab8 100644 (file)
@@ -832,10 +832,10 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 
        psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
 
-       if ((psecnetwork->IELength-12) < (256-1)) {
+       if ((psecnetwork->IELength-12) < 255) {
                memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength-12);
        } else {
-               memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256-1));
+               memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 255);
        }
 
        psecnetwork->IELength = 0;