summaryrefslogtreecommitdiffstats
path: root/aclk/schema-wrappers/node_connection.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
commit03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch)
treee16b06711a2ed77cafb4b7754be0220c3d14a9d7 /aclk/schema-wrappers/node_connection.cc
parentAdding upstream version 1.36.1. (diff)
downloadnetdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.tar.xz
netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.zip
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/schema-wrappers/node_connection.cc')
-rw-r--r--aclk/schema-wrappers/node_connection.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/aclk/schema-wrappers/node_connection.cc b/aclk/schema-wrappers/node_connection.cc
index a6ca8ef9..db1fa644 100644
--- a/aclk/schema-wrappers/node_connection.cc
+++ b/aclk/schema-wrappers/node_connection.cc
@@ -29,7 +29,7 @@ char *generate_node_instance_connection(size_t *len, const node_instance_connect
timestamp->set_nanos(tv.tv_usec * 1000);
if (data->capabilities) {
- struct capability *capa = data->capabilities;
+ const struct capability *capa = data->capabilities;
while (capa->name) {
aclk_lib::v1::Capability *proto_capa = msg.add_capabilities();
capability_set(proto_capa, capa);
@@ -38,7 +38,7 @@ char *generate_node_instance_connection(size_t *len, const node_instance_connect
}
*len = PROTO_COMPAT_MSG_SIZE(msg);
- char *bin = (char*)malloc(*len);
+ char *bin = (char*)mallocz(*len);
if (bin)
msg.SerializeToArray(bin, *len);