diff options
author | waja <waja@users.noreply.github.com> | 2023-06-28 16:39:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 16:39:09 +0200 |
commit | 103217831e07f26cead065985d0d007292ffd7ea (patch) | |
tree | 418829165611b9da69b19e2bcd0c135bf08962ab /lib/utils_base.c | |
parent | f6f2ba34c713b5bc65936af836be24ebc74faf46 (diff) | |
parent | b24eb7f46ac8667324efd818c01d68d5a1376c89 (diff) | |
download | monitoring-plugins-103217831e07f26cead065985d0d007292ffd7ea.tar.gz |
Merge branch 'master' into compiler_warning_part_3
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r-- | lib/utils_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c index 105ff44e..176fa850 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * | 24 | * |
25 | *****************************************************************************/ | 25 | *****************************************************************************/ |
26 | 26 | ||
27 | #include "common.h" | 27 | #include "../plugins/common.h" |
28 | #include <stdarg.h> | 28 | #include <stdarg.h> |
29 | #include "utils_base.h" | 29 | #include "utils_base.h" |
30 | #include <ctype.h> | 30 | #include <ctype.h> |
@@ -319,18 +319,18 @@ char *np_extract_value(const char *varlist, const char *name, char sep) { | |||
319 | 319 | ||
320 | while (1) { | 320 | while (1) { |
321 | /* Strip any leading space */ | 321 | /* Strip any leading space */ |
322 | for (varlist; isspace(varlist[0]); varlist++); | 322 | for (; isspace(varlist[0]); varlist++); |
323 | 323 | ||
324 | if (strncmp(name, varlist, strlen(name)) == 0) { | 324 | if (strncmp(name, varlist, strlen(name)) == 0) { |
325 | varlist += strlen(name); | 325 | varlist += strlen(name); |
326 | /* strip trailing spaces */ | 326 | /* strip trailing spaces */ |
327 | for (varlist; isspace(varlist[0]); varlist++); | 327 | for (; isspace(varlist[0]); varlist++); |
328 | 328 | ||
329 | if (varlist[0] == '=') { | 329 | if (varlist[0] == '=') { |
330 | /* We matched the key, go past the = sign */ | 330 | /* We matched the key, go past the = sign */ |
331 | varlist++; | 331 | varlist++; |
332 | /* strip leading spaces */ | 332 | /* strip leading spaces */ |
333 | for (varlist; isspace(varlist[0]); varlist++); | 333 | for (; isspace(varlist[0]); varlist++); |
334 | 334 | ||
335 | if (tmp = index(varlist, sep)) { | 335 | if (tmp = index(varlist, sep)) { |
336 | /* Value is delimited by a comma */ | 336 | /* Value is delimited by a comma */ |