]> 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)
commit7614e3421605d94b8ccf3f407f548ddd924c68be
treeade75512208c674292e9113545b191326467f41a
parent911cb59f743232c292eb0b698eb96402247f605b
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