]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8e9f8ff8beed1eaff6cb4674e2f029fc4f3d1f02
treeade75512208c674292e9113545b191326467f41a
parentd063cbffb285f96b97870594b4d82a28f2fb6b8f
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