projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree-wide: remove last remnants of sizeof(char)
[collectd.git]
/
src
/
write_mongodb.c
diff --git
a/src/write_mongodb.c
b/src/write_mongodb.c
index
66dc8e0
..
44181e9
100644
(file)
--- a/
src/write_mongodb.c
+++ b/
src/write_mongodb.c
@@
-171,7
+171,7
@@
static int wm_initialize(wm_node_t *node) /* {{{ */
uri_length = strlen(format_string) + strlen(node->user) +
strlen(node->passwd) + strlen(node->host) + 5 +
strlen(node->db) + 1;
uri_length = strlen(format_string) + strlen(node->user) +
strlen(node->passwd) + strlen(node->host) + 5 +
strlen(node->db) + 1;
- if ((uri = calloc(
sizeof(char)
, uri_length)) == NULL) {
+ if ((uri = calloc(
1
, uri_length)) == NULL) {
ERROR("write_mongodb plugin: Not enough memory to assemble "
"authentication string.");
mongoc_client_destroy(node->client);
ERROR("write_mongodb plugin: Not enough memory to assemble "
"authentication string.");
mongoc_client_destroy(node->client);
@@
-196,7
+196,7
@@
static int wm_initialize(wm_node_t *node) /* {{{ */
} else {
format_string = "mongodb://%s:%d";
uri_length = strlen(format_string) + strlen(node->host) + 5 + 1;
} else {
format_string = "mongodb://%s:%d";
uri_length = strlen(format_string) + strlen(node->host) + 5 + 1;
- if ((uri = calloc(
sizeof(char)
, uri_length)) == NULL) {
+ if ((uri = calloc(
1
, uri_length)) == NULL) {
ERROR("write_mongodb plugin: Not enough memory to assemble "
"authentication string.");
mongoc_client_destroy(node->client);
ERROR("write_mongodb plugin: Not enough memory to assemble "
"authentication string.");
mongoc_client_destroy(node->client);