summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-01 15:59:40 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-01 15:59:40 -0400
commit1cda6f3e756c2e76d50d398726c5b1851556756f (patch)
tree6532b12c8f7cc40b7daecb810e49596c6f509647 /src/common/util.c
parentd76fd59a7ee49b36591708070d1e50d8a50c67d0 (diff)
parentbddda9bbdb047e52652f7c6f9c2047df15a4e08e (diff)
downloadtor-1cda6f3e756c2e76d50d398726c5b1851556756f.tar.gz
tor-1cda6f3e756c2e76d50d398726c5b1851556756f.zip
Merge commit 'origin/maint-0.2.1'
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 39e265404a..90f952f793 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1876,7 +1876,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;
@@ -1961,7 +1962,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);
@@ -2020,7 +2021,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;