X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Funix.c;h=f50611b5b0eac52ad8ac92502826038eec10afeb;hp=6cdc759965ccacd7ef515ba3f4cc5fe87386d9e0;hb=dd1bac00c933616842aaf51ad4c4240ccee98838;hpb=b72ce6309a63e5c2ec29042c4677ba559f21746b diff --git a/src/common/unix.c b/src/common/unix.c index 6cdc75996..f50611b5b 100644 --- a/src/common/unix.c +++ b/src/common/unix.c @@ -253,7 +253,7 @@ retry: goto end; } } - ret = len; + end: return ret; } @@ -352,7 +352,6 @@ retry: goto end; } } - ret = len; end: return ret; } @@ -772,7 +771,7 @@ end: * Returns the size of data sent, or negative error value. */ LTTNG_HIDDEN -ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len) +ssize_t lttcomm_send_creds_unix_sock(int sock, const void *buf, size_t len) { struct msghdr msg; struct iovec iov[1]; @@ -788,7 +787,7 @@ ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len) memset(&msg, 0, sizeof(msg)); - iov[0].iov_base = buf; + iov[0].iov_base = (void *) buf; iov[0].iov_len = len; msg.msg_iov = iov; msg.msg_iovlen = 1;