summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 22:44:08 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 22:45:33 (GMT)
commit6972242126f1dbfb929dbd1c1582d973d2094d8a (patch)
treec1b1505036fdb00baba0cc17b68f46a085d17be2 /lib/utils_base.c
parent15b4e89a42a3caf2c4da3992d698b356649665a1 (diff)
downloadmonitoring-plugins-6972242126f1dbfb929dbd1c1582d973d2094d8a.tar.gz
Fixes for compiler warning -Wparenthesesrefs/pull/1939/head
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r--lib/utils_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 3c7221c..f86efbe 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -331,7 +331,7 @@ char *np_extract_value(const char *varlist, const char *name, char sep) {
331 /* strip leading spaces */ 331 /* strip leading spaces */
332 for (; isspace(varlist[0]); varlist++); 332 for (; isspace(varlist[0]); varlist++);
333 333
334 if (tmp = index(varlist, sep)) { 334 if ((tmp = index(varlist, sep))) {
335 /* Value is delimited by a comma */ 335 /* Value is delimited by a comma */
336 if (tmp-varlist == 0) continue; 336 if (tmp-varlist == 0) continue;
337 value = (char *)calloc(1, tmp-varlist+1); 337 value = (char *)calloc(1, tmp-varlist+1);
@@ -347,7 +347,7 @@ char *np_extract_value(const char *varlist, const char *name, char sep) {
347 break; 347 break;
348 } 348 }
349 } 349 }
350 if (tmp = index(varlist, sep)) { 350 if ((tmp = index(varlist, sep))) {
351 /* More keys, keep going... */ 351 /* More keys, keep going... */
352 varlist = tmp + 1; 352 varlist = tmp + 1;
353 } else { 353 } else {