projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: uninitialized variable in lib_ring_buffer_channel_switch_timer_start
[lttng-ust.git]
/
libringbuffer
/
ring_buffer_frontend.c
diff --git
a/libringbuffer/ring_buffer_frontend.c
b/libringbuffer/ring_buffer_frontend.c
index dd20852fec8ae6e58d210bc1fe7a288a677c3ff8..45c0659bfafc8bcdb83077babd00e06068d5bf74 100644
(file)
--- a/
libringbuffer/ring_buffer_frontend.c
+++ b/
libringbuffer/ring_buffer_frontend.c
@@
-51,7
+51,6
@@
* - put_subbuf
*/
* - put_subbuf
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <sys/types.h>
#include <sys/mman.h>
#define _LGPL_SOURCE
#include <sys/types.h>
#include <sys/mman.h>
@@
-805,6
+804,7
@@
void lib_ring_buffer_channel_switch_timer_start(struct channel *chan)
lib_ring_buffer_setup_timer_thread();
lib_ring_buffer_setup_timer_thread();
+ memset(&sev, 0, sizeof(sev));
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = LTTNG_UST_RB_SIG_FLUSH;
sev.sigev_value.sival_ptr = chan;
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = LTTNG_UST_RB_SIG_FLUSH;
sev.sigev_value.sival_ptr = chan;
@@
-1023,11
+1023,11
@@
struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff
/* Calculate the shm allocation layout */
shmsize = sizeof(struct channel);
/* Calculate the shm allocation layout */
shmsize = sizeof(struct channel);
- shmsize += offset_align(shmsize, __alignof__(struct lttng_ust_lib_ring_buffer_shmp));
+ shmsize +=
lttng_ust_
offset_align(shmsize, __alignof__(struct lttng_ust_lib_ring_buffer_shmp));
shmsize += sizeof(struct lttng_ust_lib_ring_buffer_shmp) * nr_streams;
chansize = shmsize;
if (priv_data_align)
shmsize += sizeof(struct lttng_ust_lib_ring_buffer_shmp) * nr_streams;
chansize = shmsize;
if (priv_data_align)
- shmsize += offset_align(shmsize, priv_data_align);
+ shmsize +=
lttng_ust_
offset_align(shmsize, priv_data_align);
shmsize += priv_data_size;
/* Allocate normal memory for channel (not shared) */
shmsize += priv_data_size;
/* Allocate normal memory for channel (not shared) */
This page took
0.023889 seconds
and
4
git commands to generate.