From: Jérémie Galarneau Date: Tue, 6 Mar 2018 16:33:19 +0000 (-0500) Subject: Clean-up: relayd send_command() helper is not const-correct X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=76b9afaa436496319456775d7ba7f20eeac09d5d Clean-up: relayd send_command() helper is not const-correct The payload sent to the relayd as part of a command is not expected to be modified when it is sent. This commit makes the data parameter 'const' to enforce this assumption. Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index c46290d1a..c3ad597ed 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -35,7 +35,7 @@ * Send command. Fill up the header and append the data. */ static int send_command(struct lttcomm_relayd_sock *rsock, - enum lttcomm_relayd_command cmd, void *data, size_t size, + enum lttcomm_relayd_command cmd, const void *data, size_t size, int flags) { int ret;