From: Mathieu Desnoyers Date: Wed, 12 Nov 2014 21:06:34 +0000 (-0500) Subject: Fix coverity warning about sizeof(void **) != sizeof(void *) X-Git-Tag: v2.7.0-rc1~68 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6b272cda454013fd54203dbf8c2d2a2a5f3a6fce;p=lttng-modules.git Fix coverity warning about sizeof(void **) != sizeof(void *) The size of the copied data is actually void *, not void **. Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/lttng-events.h b/probes/lttng-events.h index ce4c3f12..0c92c17f 100644 --- a/probes/lttng-events.h +++ b/probes/lttng-events.h @@ -438,8 +438,8 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ const void *__ctf_tmp_ptr = (_src); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef _ctf_sequence_encoded @@ -450,16 +450,16 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ const void *__ctf_tmp_ptr = (_src); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef _ctf_string #define _ctf_string(_item, _src, _user, _nowrite) \ { \ const void *__ctf_tmp_ptr = (_src); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void **)); \ - __stack_data += sizeof(void **); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ } #undef TP_PROTO