tools/nxstyle: Fix the check tool incorrectly reported no alignment.

The nxstyle check tool recognizes the division operator as
a comment. Check the following content to determine whether
it is a comment.

Change-Id: Id07c6668489895b45a1042794bc3acca66cd3c47
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
This commit is contained in:
yangjiukui 2021-09-07 11:20:23 +08:00 committed by Xiang Xiao
parent a48d81b9ad
commit 014d6d026c

View File

@ -2832,7 +2832,9 @@ int main(int argc, char **argv, char **envp)
*/
if ((bstatm || /* Begins with C keyword */
(line[indent] == '/' && bfunctions)) && /* Comment in functions */
(line[indent] == '/' &&
bfunctions &&
line[indent + 1] == '*')) && /* Comment in functions */
!bswitch && /* Not in a switch */
dnest == 0) /* Not a data definition */
{