From 229f2c6a2c870b605567e232ddcd892f56989efe Mon Sep 17 00:00:00 2001 From: Aris Date: Sun, 22 Oct 2023 20:56:23 +0100 Subject: [PATCH] Fixed warning of too few arguments --- src/funcs.c | 4 ++-- src/funcs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/funcs.c b/src/funcs.c index a744c09..ffd805f 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -227,10 +227,10 @@ char *string_to_lower(const char *text, size_t len) return result; } -size_t safeStrlen(const char *str, size_t max_len) +size_t safeStrlen(const char *str) { size_t len = 0; - while (len < max_len && str[len] != '\0') { + while (str[len] != '\0') { len++; } return len; diff --git a/src/funcs.h b/src/funcs.h index 0e604bb..d4b86a2 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -12,5 +12,5 @@ char getLastCharSafely(const char*); char* getLastTwoChars(const char*); size_t strlcpy(char *dest, const char *source, size_t size); char *string_to_lower(const char *, size_t); -size_t safeStrlen(const char *, size_t); +size_t safeStrlen(const char *str); #endif