From: Jérémie Galarneau Date: Thu, 20 Aug 2020 19:40:10 +0000 (-0400) Subject: Clean-up: consumer: consumer_metadata_cache_write is not const-correct X-Git-Tag: v2.13.0-rc1~488 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d44f9a1878031bfdb6ceee49d817430b11f0a58b;p=lttng-tools.git Clean-up: consumer: consumer_metadata_cache_write is not const-correct `data` is used as a source argument and can be marked as `const`. Signed-off-by: Jérémie Galarneau Change-Id: I9b2b32fe253e1b89a2605ed9c859a04141b321d5 --- diff --git a/src/common/consumer/consumer-metadata-cache.c b/src/common/consumer/consumer-metadata-cache.c index 03e12db55..987bf7c85 100644 --- a/src/common/consumer/consumer-metadata-cache.c +++ b/src/common/consumer/consumer-metadata-cache.c @@ -140,7 +140,7 @@ end: */ int consumer_metadata_cache_write(struct lttng_consumer_channel *channel, unsigned int offset, unsigned int len, uint64_t version, - char *data) + const char *data) { int ret = 0; struct consumer_metadata_cache *cache; diff --git a/src/common/consumer/consumer-metadata-cache.h b/src/common/consumer/consumer-metadata-cache.h index a442dcaf2..ecb7e1549 100644 --- a/src/common/consumer/consumer-metadata-cache.h +++ b/src/common/consumer/consumer-metadata-cache.h @@ -37,7 +37,7 @@ struct consumer_metadata_cache { int consumer_metadata_cache_write(struct lttng_consumer_channel *channel, unsigned int offset, unsigned int len, uint64_t version, - char *data); + const char *data); int consumer_metadata_cache_allocate(struct lttng_consumer_channel *channel); void consumer_metadata_cache_destroy(struct lttng_consumer_channel *channel); int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel,