iov: add const annotation

iov_from_buf does not change iov, make it const.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2012-09-24 12:50:32 +02:00
parent 40bad8f3de
commit 844b5cea8e
2 changed files with 2 additions and 2 deletions

2
iov.c
View File

@ -26,7 +26,7 @@
# include <sys/socket.h>
#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 done;

2
iov.h
View File

@ -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),
* 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 iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt,
size_t offset, void *buf, size_t bytes);