X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.cpp;h=4d64b0ea2be2b7f531f5fc03c1eef4573d2eefc8;hp=eb7e6375eed4577736fb303a098ab37a6d7c3ece;hb=5c7248cd5bce45bf64d563fb4e130a63bf345f11;hpb=cd9adb8b829564212158943a0d279bb35322ab30 diff --git a/src/common/consumer/consumer.cpp b/src/common/consumer/consumer.cpp index eb7e6375e..4d64b0ea2 100644 --- a/src/common/consumer/consumer.cpp +++ b/src/common/consumer/consumer.cpp @@ -104,7 +104,8 @@ static void notify_thread_lttng_pipe(struct lttng_pipe *pipe) LTTNG_ASSERT(pipe); - (void) lttng_pipe_write(pipe, &null_stream, sizeof(null_stream)); + (void) lttng_pipe_write(pipe, &null_stream, sizeof(null_stream)); /* NOLINT sizeof used on a + pointer. */ } static void notify_health_quit_pipe(int *pipe) @@ -2375,8 +2376,11 @@ void *consumer_thread_metadata_poll(void *data) pipe_len = lttng_pipe_read(ctx->consumer_metadata_pipe, &stream, - sizeof(stream)); - if (pipe_len < sizeof(stream)) { + sizeof(stream)); /* NOLINT sizeof + used on a + pointer. */ + if (pipe_len < sizeof(stream)) { /* NOLINT sizeof used on a + pointer. */ if (pipe_len < 0) { PERROR("read metadata stream"); } @@ -2643,9 +2647,12 @@ void *consumer_thread_data_poll(void *data) ssize_t pipe_readlen; DBG("consumer_data_pipe wake up"); - pipe_readlen = lttng_pipe_read( - ctx->consumer_data_pipe, &new_stream, sizeof(new_stream)); - if (pipe_readlen < sizeof(new_stream)) { + pipe_readlen = lttng_pipe_read(ctx->consumer_data_pipe, + &new_stream, + sizeof(new_stream)); /* NOLINT sizeof used on + a pointer. */ + if (pipe_readlen < sizeof(new_stream)) { /* NOLINT sizeof used on a pointer. + */ PERROR("Consumer data pipe"); /* Continue so we can at least handle the current stream(s). */ continue;