From: Mathieu Desnoyers Date: Thu, 25 Mar 2021 19:57:05 +0000 (-0400) Subject: Cleanup: use "char" type for padding X-Git-Tag: v2.13.0-rc1~204 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b4c8bf2f2320b7a2d19dec6addda5d6d2aa227a3;p=lttng-ust.git Cleanup: use "char" type for padding The ring buffer strcpy operation can take a "char" rather than "int" as parameter, which is a closer match to its actual expected type. Same goes for the do memset internal operation. Signed-off-by: Mathieu Desnoyers Change-Id: I3c043ecff46cfef48c8992d004154383f7cab59d --- diff --git a/libringbuffer/backend.h b/libringbuffer/backend.h index 4ecbfe53..bced86d9 100644 --- a/libringbuffer/backend.h +++ b/libringbuffer/backend.h @@ -137,7 +137,7 @@ size_t lib_ring_buffer_do_strcpy(const struct lttng_ust_lib_ring_buffer_config * static inline __attribute__((always_inline)) void lib_ring_buffer_strcpy(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_ctx *ctx, - const char *src, size_t len, int pad) + const char *src, size_t len, char pad) { struct channel_backend *chanb = &ctx->chan->backend; struct lttng_ust_shm_handle *handle = ctx->handle; diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h index 766fde2d..3bd588b9 100644 --- a/libringbuffer/backend_internal.h +++ b/libringbuffer/backend_internal.h @@ -635,7 +635,7 @@ do { \ * write len bytes to dest with c */ static inline -void lib_ring_buffer_do_memset(char *dest, int c, unsigned long len) +void lib_ring_buffer_do_memset(char *dest, char c, unsigned long len) { unsigned long i;