From f04e5f9af744f9c84641adae33d27cd484087428 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 26 Jun 2024 17:59:29 +0200 Subject: lib/string: change parameter types to match C standard The third parameter of strncpy and strncmp is supposed to be a size_t and not a signed int. Signed-off-by: Felix Held Change-Id: I485e45e18232a0d1625d4d626f923ec66cfbe4a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83222 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) Reviewed-by: Varshit Pandya Reviewed-by: Marshall Dawson Reviewed-by: Elyes Haouas --- src/lib/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/string.c') diff --git a/src/lib/string.c b/src/lib/string.c index d23ed1f7e5..7553295a7d 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -71,7 +71,7 @@ char *strrchr(const char *s, int c) return p; } -char *strncpy(char *to, const char *from, int count) +char *strncpy(char *to, const char *from, size_t count) { char *ret = to; char data; @@ -113,7 +113,7 @@ int strcmp(const char *s1, const char *s2) return r; } -int strncmp(const char *s1, const char *s2, int maxlen) +int strncmp(const char *s1, const char *s2, size_t maxlen) { int i; -- cgit v1.2.3