projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9be7c0d
)
collectd-nagios: remove unneccesary casts
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 14 Dec 2018 18:15:07 +0000
(19:15 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 14 Dec 2018 18:15:07 +0000
(19:15 +0100)
src/collectd-nagios.c
patch
|
blob
|
history
diff --git
a/src/collectd-nagios.c
b/src/collectd-nagios.c
index
54be36a
..
33580f9
100644
(file)
--- a/
src/collectd-nagios.c
+++ b/
src/collectd-nagios.c
@@
-116,7
+116,7
@@
cn_strdup(const char *str) /* {{{ */
char *ret;
strsize = strlen(str) + 1;
char *ret;
strsize = strlen(str) + 1;
- ret =
(char *)
malloc(strsize);
+ ret = malloc(strsize);
if (ret != NULL)
memcpy(ret, str, strsize);
return ret;
if (ret != NULL)
memcpy(ret, str, strsize);
return ret;
@@
-130,13
+130,13
@@
static int filter_ds(size_t *values_num, double **values,
if (match_ds_g == NULL)
return RET_OKAY;
if (match_ds_g == NULL)
return RET_OKAY;
- new_values =
(gauge_t *)
calloc(match_ds_num_g, sizeof(*new_values));
+ new_values = calloc(match_ds_num_g, sizeof(*new_values));
if (new_values == NULL) {
fprintf(stderr, "calloc failed: %s\n", strerror(errno));
return RET_UNKNOWN;
}
if (new_values == NULL) {
fprintf(stderr, "calloc failed: %s\n", strerror(errno));
return RET_UNKNOWN;
}
- new_names =
(char **)
calloc(match_ds_num_g, sizeof(*new_names));
+ new_names = calloc(match_ds_num_g, sizeof(*new_names));
if (new_names == NULL) {
fprintf(stderr, "calloc failed: %s\n", strerror(errno));
free(new_values);
if (new_names == NULL) {
fprintf(stderr, "calloc failed: %s\n", strerror(errno));
free(new_values);