diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:17 +0000 |
commit | 7877a98bd9c00db5e81dd2f8c734cba2bab20be7 (patch) | |
tree | d18b767250f7c7ced9b8abe2ece784ac1fe24d3e /collectors/plugins.d/plugins_d.c | |
parent | Releasing debian version 1.35.1-2. (diff) | |
download | netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.tar.xz netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.zip |
Merging upstream version 1.36.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/plugins.d/plugins_d.c')
-rw-r--r-- | collectors/plugins.d/plugins_d.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/collectors/plugins.d/plugins_d.c b/collectors/plugins.d/plugins_d.c index 2916f1c13..377ec1401 100644 --- a/collectors/plugins.d/plugins_d.c +++ b/collectors/plugins.d/plugins_d.c @@ -39,7 +39,7 @@ inline int config_isspace(char c) inline int quoted_strings_splitter(char *str, char **words, int max_words, int (*custom_isspace)(char), char *recover_input, char **recover_location, int max_recover) { char *s = str, quote = 0; - int i = 0, j, rec = 0; + int i = 0, rec = 0; char *recover = recover_input; // skip all white space @@ -112,9 +112,7 @@ inline int quoted_strings_splitter(char *str, char **words, int max_words, int ( } // terminate the words - j = i; - while (likely(j < max_words)) - words[j++] = NULL; + memset(&words[i], 0, (max_words - i) * sizeof (char *)); return i; } |