提交 844b5cea 编写于 作者: M Michael S. Tsirkin

iov: add const annotation

iov_from_buf does not change iov, make it const.
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 40bad8f3
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
size_t iov_from_buf(struct iovec *iov, unsigned int iov_cnt, size_t iov_from_buf(const struct iovec *iov, unsigned int iov_cnt,
size_t offset, const void *buf, size_t bytes) size_t offset, const void *buf, size_t bytes)
{ {
size_t done; size_t done;
......
...@@ -36,7 +36,7 @@ size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt); ...@@ -36,7 +36,7 @@ size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt);
* such "large" value is -1 (sinice size_t is unsigned), * such "large" value is -1 (sinice size_t is unsigned),
* so specifying `-1' as `bytes' means 'up to the end of iovec'. * so specifying `-1' as `bytes' means 'up to the end of iovec'.
*/ */
size_t iov_from_buf(struct iovec *iov, unsigned int iov_cnt, size_t iov_from_buf(const struct iovec *iov, unsigned int iov_cnt,
size_t offset, const void *buf, size_t bytes); size_t offset, const void *buf, size_t bytes);
size_t iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt, size_t iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt,
size_t offset, void *buf, size_t bytes); size_t offset, void *buf, size_t bytes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册