aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 7b9e5eb562..9dcf9fba64 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1816,7 +1816,8 @@ write_chunks_to_file_impl(const char *fname, const smartlist_t *chunks,
int open_flags)
{
open_file_t *file = NULL;
- int fd, result;
+ int fd;
+ ssize_t result;
fd = start_writing_to_file(fname, open_flags, 0600, &file);
if (fd<0)
return -1;
@@ -1901,7 +1902,7 @@ read_file_to_str(const char *filename, int flags, struct stat *stat_out)
int fd; /* router file */
struct stat statbuf;
char *string;
- int r;
+ ssize_t r;
int bin = flags & RFTS_BIN;
tor_assert(filename);
@@ -1960,7 +1961,7 @@ read_file_to_str(const char *filename, int flags, struct stat *stat_out)
* match for size. */
int save_errno = errno;
log_warn(LD_FS,"Could read only %d of %ld bytes of file \"%s\".",
- r, (long)statbuf.st_size,filename);
+ (int)r, (long)statbuf.st_size,filename);
tor_free(string);
close(fd);
errno = save_errno;