Fix coverity warning about sizeof(void **) != sizeof(void *)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Nov 2014 21:05:36 +0000 (16:05 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Nov 2014 21:05:36 +0000 (16:05 -0500)
The size of the copied data is actually void *, not void **.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-tracepoint-event.h

index 88953108e65506573dc6740e54ab69f7323fdd1a..3f99f6626bb75871b27d85f92ba001081fee0dc2 100644 (file)
@@ -385,8 +385,8 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS
                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
@@ -397,16 +397,16 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS
                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, _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_ARGS
This page took 0.029846 seconds and 4 git commands to generate.