lib: sbi: Fix sbi_strnlen wrong count decrement

count(maxlen) should not be decremented here

Fixes: 1901e8a287 ("platform: Add minimal libc support.")
Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Rahul Pathak
2022-09-13 15:17:08 +05:30
committed by Anup Patel
parent 8ce486a781
commit 49372f2691

View File

@@ -59,7 +59,6 @@ size_t sbi_strnlen(const char *str, size_t count)
while (*str != '\0' && ret < count) {
ret++;
str++;
count--;
}
return ret;