lib: sbi: Fix bug in strncmp function when count is 0
authorDong Du <Dd_nirvana@sjtu.edu.cn>
Wed, 28 Jul 2021 16:15:35 +0000 (00:15 +0800)
committerAnup Patel <anup@brainfault.org>
Sat, 7 Aug 2021 10:10:40 +0000 (15:40 +0530)
commitd244f3dbd6cfd241dc1db611c0325daedfcab9c6
tree2efab53955b3a7c3d119d051c58b43bc5b3aca5d
parente928472e67f86d73c00537dfa6d5cef5d646426d
lib: sbi: Fix bug in strncmp function when count is 0

No need to compare characters when the count turns to 0.
Fix the issue in sbi_strncmp.

Signed-off-by: Dong Du <Dd_nirvana@sjtu.edu.cn>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
lib/sbi/sbi_string.c