From: Jérémie Galarneau Date: Fri, 9 Aug 2019 18:00:22 +0000 (-0400) Subject: Clean-up: declare dummy pipe payload as a char instead of a string X-Git-Tag: v2.12.0-rc1~508 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=be2956e7f73ef08fa3182ae636ba6cd7725fdaaf Clean-up: declare dummy pipe payload as a char instead of a string Only the first byte of the 'dummy' string is used. Hence, a single char can be used. Signed-off-by: Jérémie Galarneau --- 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