projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5'
[collectd.git]
/
src
/
write_sensu.c
diff --git
a/src/write_sensu.c
b/src/write_sensu.c
index
2336541
..
b09dcc8
100644
(file)
--- a/
src/write_sensu.c
+++ b/
src/write_sensu.c
@@
-455,7
+455,7
@@
static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
}
// incorporate sensu tags from config if any
}
// incorporate sensu tags from config if any
- if (
strlen(sensu_tags) != 0
) {
+ if (
(sensu_tags != NULL) && (strlen(sensu_tags) != 0)
) {
res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
free(ret_str);
if (res == -1) {
res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
free(ret_str);
if (res == -1) {
@@
-752,7
+752,7
@@
static char *sensu_notification_to_json(struct sensu_host *host, /* {{{ */
}
// incorporate sensu tags from config if any
}
// incorporate sensu tags from config if any
- if (
strlen(sensu_tags) != 0
) {
+ if (
(sensu_tags != NULL) && (strlen(sensu_tags) != 0)
) {
res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
free(ret_str);
if (res == -1) {
res = asprintf(&temp_str, "%s, %s", ret_str, sensu_tags);
free(ret_str);
if (res == -1) {