From be2956e7f73ef08fa3182ae636ba6cd7725fdaaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 9 Aug 2019 14:00:22 -0400 Subject: [PATCH] Clean-up: declare dummy pipe payload as a char instead of a string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only the first byte of the 'dummy' string is used. Hence, a single char can be used. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/rotation-thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index aaa212941..cb06413b6 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -216,7 +216,7 @@ void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue, struct ltt_session *session) { int ret; - const char * const dummy = "!"; + const char dummy = '!'; struct rotation_thread_job *job = NULL; const char *job_type_str = get_job_type_str(job_type); @@ -242,8 +242,8 @@ void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue, job->type = job_type; cds_list_add_tail(&job->head, &queue->list); - ret = lttng_write(lttng_pipe_get_writefd(queue->event_pipe), dummy, - 1); + ret = lttng_write(lttng_pipe_get_writefd(queue->event_pipe), &dummy, + sizeof(dummy)); if (ret < 0) { /* * We do not want to block in the timer handler, the job has -- 2.34.1