Clean-up: relayd send_command() helper is not const-correct
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Mar 2018 16:33:19 +0000 (11:33 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Mar 2018 16:37:27 +0000 (11:37 -0500)
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 <jeremie.galarneau@efficios.com>
src/common/relayd/relayd.c

index c46290d1a2978f205dbf7e07d903a0d428f405fd..c3ad597ed8eb50d69dd9a57e65399a996ff423b3 100644 (file)
@@ -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;
This page took 0.026995 seconds and 4 git commands to generate.