Add a few consts where appropriate

This commit is contained in:
Vincent Penquerc'h 2014-02-15 07:03:33 -05:00 committed by Marek Marczykowski-Górecki
parent 9f3a74fd77
commit 03c9cb1388
4 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ int copy_file(int outfd, int infd, long long size, unsigned long *crc32)
return COPY_FILE_OK;
}
char * copy_file_status_to_str(int status)
const char * copy_file_status_to_str(int status)
{
switch (status) {
case COPY_FILE_OK: return "OK";

View File

@ -47,7 +47,7 @@ int read_ready_vchan_ext(void);
int read_all(int fd, void *buf, int size);
int read_all_vchan_ext(void *buf, int size);
int write_all(int fd, const void *buf, int size);
int write_all_vchan_ext(void *buf, int size);
int write_all_vchan_ext(const void *buf, int size);
int buffer_space_vchan_ext(void);
void fix_fds(int fdin, int fdout, int fderr);
void set_nonblock(int fd);

View File

@ -63,7 +63,7 @@ enum {
typedef void (notify_progress_t)(int, int);
void register_notify_progress(notify_progress_t *func);
int copy_file(int outfd, int infd, long long size, unsigned long *crc32);
char *copy_file_status_to_str(int status);
const char *copy_file_status_to_str(int status);
void set_size_limit(long long new_bytes_limit, long long new_files_limit);
void set_verbose(int value);
int write_all(int fd, const void *buf, int size);

View File

@ -36,7 +36,7 @@ int write_all_vchan_ext(const void *buf, int size)
while (written < size) {
ret =
libvchan_write(ctrl, (char *) buf + written,
libvchan_write(ctrl, (const char *) buf + written,
size - written);
if (ret <= 0) {
perror("write");