vchan: specify data param of libvchan_write as const
It isn't (and shouldn't) modified by the function so mark it in declaration. This will also help catching some errors.
This commit is contained in:
parent
595696b6f6
commit
6b23655fb7
@ -129,7 +129,7 @@ int libvchan_wait(struct libvchan *ctrl)
|
||||
may write less data than requested;
|
||||
returns the amount of data processed, -1 on error or peer close
|
||||
*/
|
||||
int libvchan_write(struct libvchan *ctrl, char *data, int size)
|
||||
int libvchan_write(struct libvchan *ctrl, const char *data, int size)
|
||||
{
|
||||
int avail, avail_contig;
|
||||
int real_idx;
|
||||
|
@ -78,7 +78,7 @@ struct libvchan *libvchan_server_init(int devno);
|
||||
struct libvchan *libvchan_client_init(int domain, int devno);
|
||||
|
||||
int libvchan_server_handle_connected(struct libvchan *ctrl);
|
||||
int libvchan_write(struct libvchan *ctrl, char *data, int size);
|
||||
int libvchan_write(struct libvchan *ctrl, const char *data, int size);
|
||||
int libvchan_read(struct libvchan *ctrl, char *data, int size);
|
||||
int libvchan_wait(struct libvchan *ctrl);
|
||||
int libvchan_close(struct libvchan *ctrl);
|
||||
|
Loading…
Reference in New Issue
Block a user