summaryrefslogtreecommitdiff
path: root/source3/lib/xfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/xfile.c')
-rw-r--r--source3/lib/xfile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/xfile.c b/source3/lib/xfile.c
index 57f3e27638..1534dd855e 100644
--- a/source3/lib/xfile.c
+++ b/source3/lib/xfile.c
@@ -140,9 +140,10 @@ int x_fclose(XFILE *f)
}
/* simulate fwrite() */
-int x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
+size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
{
- int ret, total=0;
+ ssize_t ret;
+ size_t total=0;
/* we might be writing unbuffered */
if (f->buftype == X_IONBF ||
@@ -154,7 +155,7 @@ int x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
while (total < size*nmemb) {
- int n = f->bufsize - f->bufused;
+ size_t n = f->bufsize - f->bufused;
n = MIN(n, (size*nmemb)-total);
if (n == 0) {