From cfae8759b9db9198596d7377e4531e4ba7acc0f8 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Sat, 4 Feb 2023 01:40:48 +0100 Subject: Update to libstr --- src/log.c | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/src/log.c b/src/log.c index 7b03550..85f94c9 100644 --- a/src/log.c +++ b/src/log.c @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include "log.h" @@ -56,50 +56,6 @@ log_parse_level_property(char *str_level) return -1; } -static int -strends(const char *str1, const char *str2) -{ - int str1_s = strlen(str1); - int str2_s = strlen(str2); - int i, offset; - - if (str1_s < str2_s) { - /* str2 is longer than str1, so str1 doesn't contain str2 */ - return 1; - } - - offset = str1_s - str2_s; - - for (i = str1_s - 1; i <= offset; i++) { - if (str1[i] != str2[i - offset]) { - return 1; - } - } - - return 0; -} - -static int -strstarts(const char *str1, const char *str2) -{ - int str1_s = strlen(str1); - int str2_s = strlen(str2); - int i; - - if (str1_s < str2_s) { - /* str2 is longer than str1, so str1 doesn't contain str2 */ - return 1; - } - - for (i = 0; i < str2_s; i++) { - if (str1[i] != str2[i]) { - return 1; - } - } - - return 0; -} - static int stridxof(const char *str, char c) { -- cgit v1.2.3