projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
all plugins: remove pthread.h include
[collectd.git]
/
src
/
collectd-nagios.c
diff --git
a/src/collectd-nagios.c
b/src/collectd-nagios.c
index
b17e47e
..
fe56d5d
100644
(file)
--- a/
src/collectd-nagios.c
+++ b/
src/collectd-nagios.c
@@
-136,14
+136,14
@@
static int filter_ds (size_t *values_num,
new_values = (gauge_t *)calloc (match_ds_num_g, sizeof (*new_values));
if (new_values == NULL)
{
new_values = (gauge_t *)calloc (match_ds_num_g, sizeof (*new_values));
if (new_values == NULL)
{
- fprintf (stderr, "
m
alloc failed: %s\n", strerror (errno));
+ fprintf (stderr, "
c
alloc failed: %s\n", strerror (errno));
return (RET_UNKNOWN);
}
new_names = (char **)calloc (match_ds_num_g, sizeof (*new_names));
if (new_names == NULL)
{
return (RET_UNKNOWN);
}
new_names = (char **)calloc (match_ds_num_g, sizeof (*new_names));
if (new_names == NULL)
{
- fprintf (stderr, "
m
alloc failed: %s\n", strerror (errno));
+ fprintf (stderr, "
c
alloc failed: %s\n", strerror (errno));
free (new_values);
return (RET_UNKNOWN);
}
free (new_values);
return (RET_UNKNOWN);
}
@@
-245,6
+245,7
@@
static int match_range (range_t *range, double value)
return (((ret - range->invert) == 0) ? 0 : 1);
} /* int match_range */
return (((ret - range->invert) == 0) ? 0 : 1);
} /* int match_range */
+__attribute__((noreturn))
static void usage (const char *name)
{
fprintf (stderr, "Usage: %s <-s socket> <-n value_spec> <-H hostname> [options]\n"
static void usage (const char *name)
{
fprintf (stderr, "Usage: %s <-s socket> <-n value_spec> <-H hostname> [options]\n"
@@
-693,7
+694,7
@@
int main (int argc, char **argv)
case 'd':
{
char **tmp;
case 'd':
{
char **tmp;
- tmp =
(char **)
realloc (match_ds_g,
+ tmp = realloc (match_ds_g,
(match_ds_num_g + 1)
* sizeof (char *));
if (tmp == NULL)
(match_ds_num_g + 1)
* sizeof (char *));
if (tmp == NULL)