From 40b66b269dbc4de5b7808ab05f7309f3f5092e52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 30 Nov 2018 20:04:08 -0500 Subject: [PATCH] Mark lttng_pipe as const where possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/common/pipe.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/pipe.h b/src/common/pipe.h index 30f7c3f30..01fe88242 100644 --- a/src/common/pipe.h +++ b/src/common/pipe.h @@ -51,7 +51,7 @@ struct lttng_pipe { /* * Return 1 if read side is open else 0. */ -static inline int lttng_pipe_is_read_open(struct lttng_pipe *pipe) +static inline int lttng_pipe_is_read_open(const struct lttng_pipe *pipe) { return pipe->r_state == LTTNG_PIPE_STATE_OPENED ? 1 : 0; } @@ -59,17 +59,17 @@ static inline int lttng_pipe_is_read_open(struct lttng_pipe *pipe) /* * Return 1 if write side is open else 0. */ -static inline int lttng_pipe_is_write_open(struct lttng_pipe *pipe) +static inline int lttng_pipe_is_write_open(const struct lttng_pipe *pipe) { return pipe->w_state == LTTNG_PIPE_STATE_OPENED ? 1 : 0; } -static inline int lttng_pipe_get_readfd(struct lttng_pipe *pipe) +static inline int lttng_pipe_get_readfd(const struct lttng_pipe *pipe) { return pipe->fd[0]; } -static inline int lttng_pipe_get_writefd(struct lttng_pipe *pipe) +static inline int lttng_pipe_get_writefd(const struct lttng_pipe *pipe) { return pipe->fd[1]; } -- 2.34.1