summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-03-12 13:16:35 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-04-17 22:13:24 (GMT)
commit6c78f0b5ea82a4bea71ae2024f27d3916175a7a2 (patch)
treec8a70477926d3d919c6938b851fb81169ab930f4 /lib/utils_base.c
parentcee364f219ed73c75a4c4bfb5ac148b8a721780c (diff)
downloadmonitoring-plugins-6c78f0b5ea82a4bea71ae2024f27d3916175a7a2.tar.gz
Fixes for -Wunusedrefs/pull/1866/head
* lib/utils_base.c * plugins/check_curl.c * plugins-root/check_dhcp.c Removed a line which theoretically can not do anything, but there was comment which indicated something else. Still trying this though.
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r--lib/utils_base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index eb1823b..c458cf6 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 */