From 2374e2dfa73b1c48dc671730951ea2902463208c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 4 Jul 2020 18:23:02 +0200 Subject: [PATCH] ci: fix compiler errors --- lib/formats/protobuf.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/formats/protobuf.cpp b/lib/formats/protobuf.cpp index 514e8c7ea..117cddcc1 100644 --- a/lib/formats/protobuf.cpp +++ b/lib/formats/protobuf.cpp @@ -28,7 +28,9 @@ #include #include #include +#include +using namespace villas; using namespace villas::utils; static enum SignalType protobuf_detect_format(Villas__Node__Value *val) @@ -96,7 +98,7 @@ int protobuf_sprint(struct io *io, char *buf, size_t len, size_t *wbytes, struct pb_smp->n_values = smp->length; pb_smp->values = new Villas__Node__Value*[pb_smp->n_values]; - if (pb_msg->values) + if (!pb_smp->values) throw MemoryAllocationError(); for (unsigned j = 0; j < pb_smp->n_values; j++) {