projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
496ca2b
)
src/utils_db_query.c: Correctly handle return value of strjoin().
author
Florian Forster
<octo@collectd.org>
Sat, 6 Aug 2016 19:21:56 +0000
(21:21 +0200)
committer
Florian Forster
<octo@collectd.org>
Sat, 6 Aug 2016 19:21:59 +0000
(21:21 +0200)
It returns the number of bytes, not zero, on success. This fixes a
bug introduced in
496ca2b758344bc6372ab0adf98ad8050f69b25a
.
src/utils_db_query.c
patch
|
blob
|
history
diff --git
a/src/utils_db_query.c
b/src/utils_db_query.c
index
9a16873
..
5fbdfd1
100644
(file)
--- a/
src/utils_db_query.c
+++ b/
src/utils_db_query.c
@@
-238,7
+238,7
@@
static int udb_result_submit (udb_result_t *r, /* {{{ */
{
int status = strjoin (vl.type_instance, sizeof (vl.type_instance),
r_area->instances_buffer, r->instances_num, "-");
- if (status
!=
0)
+ if (status
<
0)
{
ERROR ("udb_result_submit: creating type_instance failed with status %d.",
status);
@@
-251,7
+251,7
@@
static int udb_result_submit (udb_result_t *r, /* {{{ */
int status = strjoin (tmp, sizeof (tmp), r_area->instances_buffer,
r->instances_num, "-");
- if (status
!=
0)
+ if (status
<
0)
{
ERROR ("udb_result_submit: creating type_instance failed with status %d.",
status);