diff options
| author | Rahul Pathak <[email protected]> | 2022-09-13 15:17:08 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-09-13 17:17:10 +0530 |
| commit | 49372f2691a006d5a8d424b5a90be23539b06067 (patch) | |
| tree | b237bcc7dcff9f39df98c35b4bfe5773e22480ec | |
| parent | 8ce486a781f61941c136efd507a91677f34da713 (diff) | |
lib: sbi: Fix sbi_strnlen wrong count decrement
count(maxlen) should not be decremented here
Fixes: 1901e8a287bc ("platform: Add minimal libc support.")
Signed-off-by: Rahul Pathak <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_string.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/sbi/sbi_string.c b/lib/sbi/sbi_string.c index c163f317..9ebea693 100644 --- a/lib/sbi/sbi_string.c +++ b/lib/sbi/sbi_string.c @@ -59,7 +59,6 @@ size_t sbi_strnlen(const char *str, size_t count) while (*str != '\0' && ret < count) { ret++; str++; - count--; } return ret; |
