diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /libnetdata/string/string.c | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/string/string.c')
-rw-r--r-- | libnetdata/string/string.c | 6 |
1 files changed, 1 insertions, 5 deletions
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; |