Cleanup: use "char" type for padding
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Mar 2021 19:57:05 +0000 (15:57 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Mar 2021 12:54:20 +0000 (08:54 -0400)
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 <mathieu.desnoyers@efficios.com>
Change-Id: I3c043ecff46cfef48c8992d004154383f7cab59d

libringbuffer/backend.h
libringbuffer/backend_internal.h

index 4ecbfe53886a28bb36a2b6c46eeea59702a84a18..bced86d96885950e4842a7c394508e86960a978c 100644 (file)
@@ -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;
index 766fde2d30d851d79bcd05770be5b8786c991807..3bd588b9f891a6f500f38e79f21b5d5a65741b3a 100644 (file)
@@ -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;
 
This page took 0.026249 seconds and 4 git commands to generate.