From c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:22 +0100 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- libnetdata/string/string.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libnetdata/string/string.c') diff --git a/libnetdata/string/string.c b/libnetdata/string/string.c index 54b8f171f..e1c8352a5 100644 --- a/libnetdata/string/string.c +++ b/libnetdata/string/string.c @@ -338,10 +338,6 @@ inline const char *string2str(STRING *string) { return string->str; } -int string_strcmp(STRING *string, const char *s) { - return strcmp(string2str(string), s); -} - STRING *string_2way_merge(STRING *a, STRING *b) { static STRING *X = NULL; @@ -420,7 +416,7 @@ static char **string_unittest_generate_names(size_t entries) { char **names = mallocz(sizeof(char *) * entries); for(size_t i = 0; i < entries ;i++) { char buf[25 + 1] = ""; - snprintfz(buf, 25, "name.%zu.0123456789.%zu \t !@#$%%^&*(),./[]{}\\|~`", i, entries / 2 + i); + snprintfz(buf, sizeof(buf) - 1, "name.%zu.0123456789.%zu \t !@#$%%^&*(),./[]{}\\|~`", i, entries / 2 + i); names[i] = strdupz(buf); } return names; -- cgit v1.2.3