summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 000a676)
raw | patch | inline | side by side (parent: 000a676)
author | Florian Forster <octo@collectd.org> | |
Sat, 6 Aug 2016 18:15:51 +0000 (20:15 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 6 Aug 2016 18:17:13 +0000 (20:17 +0200) |
Fixes: #4
src/utils_db_query.c | patch | blob | history |
diff --git a/src/utils_db_query.c b/src/utils_db_query.c
index 6b3c056cb31d6bad732ec133a658c8645a044069..9a16873922290730218e40a1ecfe17f8a2592f02 100644 (file)
--- a/src/utils_db_query.c
+++ b/src/utils_db_query.c
{
if (r->instance_prefix == NULL)
{
- strjoin (vl.type_instance, sizeof (vl.type_instance),
+ int status = strjoin (vl.type_instance, sizeof (vl.type_instance),
r_area->instances_buffer, r->instances_num, "-");
+ if (status != 0)
+ {
+ ERROR ("udb_result_submit: creating type_instance failed with status %d.",
+ status);
+ return (status);
+ }
}
else
{
char tmp[DATA_MAX_NAME_LEN];
- strjoin (tmp, sizeof (tmp), r_area->instances_buffer,
+ int status = strjoin (tmp, sizeof (tmp), r_area->instances_buffer,
r->instances_num, "-");
+ if (status != 0)
+ {
+ ERROR ("udb_result_submit: creating type_instance failed with status %d.",
+ status);
+ return (status);
+ }
tmp[sizeof (tmp) - 1] = 0;
snprintf (vl.type_instance, sizeof (vl.type_instance), "%s-%s",