staging: r8188eu: rewrite subtraction in core/rtw_cmd.c

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>
This commit is contained in:
Michael Straube 2021-08-16 17:57:57 +02:00 committed by Greg Kroah-Hartman
parent 8694ef2d90
commit f1249cfdb3

View File

@ -832,10 +832,10 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength; 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); memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength-12);
} else { } else {
memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256-1)); memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], 255);
} }
psecnetwork->IELength = 0; psecnetwork->IELength = 0;