staging: rtl8723au: Rework two byte array comparisons
authorM. Vefa Bicakci <m.v.b@runbox.com>
Sun, 29 Mar 2015 01:07:56 +0000 (21:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2015 13:25:46 +0000 (15:25 +0200)
commit87a432944f13b408167208dc509a8af62c66312c
treeade75512208c674292e9113545b191326467f41a
parent046ca5f7e10c476a6fd762c1561cc07f259f97a8
staging: rtl8723au: Rework two byte array comparisons

Prior to this commit, rtl8723au's rtw_security.c had two instances of
byte array comparisons (for CRC checks) where the individual elements
of the byte arrays were compared one by one and an error trace would
be output if the byte arrays were determined to be different.

This commit improves the readability of the CRC verification by
placing the individual 4 bytes of each byte array into an 32-bit
unsigned integer and comparing the two resulting integers.

Thanks to Larry Finger for spotting the code style issues in the
previous version of this commit, and thanks to Joe Perches for
suggesting the use of 32-bit integer comparisons instead of byte
array comparisons.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_security.c