New upstream version 2.3.4

This commit is contained in:
Jan Wagner 2023-10-18 07:29:37 +00:00
parent e7bdd1c6c6
commit de72f6f588
556 changed files with 90432 additions and 53391 deletions

View file

@ -1,24 +1,24 @@
/*****************************************************************************
*
*
* Monitoring Plugins parse_ini library
*
*
* License: GPL
* Copyright (c) 2007 Monitoring Plugins Development Team
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
*
*
*****************************************************************************/
#include "common.h"
@ -78,7 +78,7 @@ static char *default_file_in_path(void);
/*
* Parse_locator decomposes a string of the form
* [stanza][@filename]
* into its seperate parts.
* into its separate parts.
*/
static void
parse_locator(const char *locator, const char *def_stanza, np_ini_info *i)
@ -131,7 +131,7 @@ np_get_defaults(const char *locator, const char *default_section)
if (inifile == NULL)
die(STATE_UNKNOWN, _("Can't read config file: %s\n"),
strerror(errno));
if (read_defaults(inifile, i.stanza, &defaults) == FALSE)
if (!read_defaults(inifile, i.stanza, &defaults))
die(STATE_UNKNOWN,
_("Invalid section '%s' in config file '%s'\n"), i.stanza,
i.file);
@ -157,7 +157,8 @@ np_get_defaults(const char *locator, const char *default_section)
static int
read_defaults(FILE *f, const char *stanza, np_arg_list **opts)
{
int c, status = FALSE;
int c = 0;
bool status = false;
size_t i, stanza_len;
enum { NOSTANZA, WRONGSTANZA, RIGHTSTANZA } stanzastate = NOSTANZA;
@ -169,7 +170,7 @@ read_defaults(FILE *f, const char *stanza, np_arg_list **opts)
if (isspace(c))
continue;
switch (c) {
/* globble up coment lines */
/* globble up comment lines */
case ';':
case '#':
GOBBLE_TO(f, c, '\n');
@ -219,7 +220,7 @@ read_defaults(FILE *f, const char *stanza, np_arg_list **opts)
die(STATE_UNKNOWN, "%s\n",
_("Config file error"));
}
status = TRUE;
status = true;
break;
}
break;