summaryrefslogtreecommitdiff
path: root/source3/lib/xfile.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-24 03:09:08 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-24 03:09:08 +0000
commit266ec4aac04cb8666234f18baa38ff6387f40cb3 (patch)
tree4d9d7c402de541088943102072b26bba14d480d8 /source3/lib/xfile.c
parentecad7bea2cf9af30fa492ba943081275db16c0ee (diff)
downloadsamba-266ec4aac04cb8666234f18baa38ff6387f40cb3.tar.gz
samba-266ec4aac04cb8666234f18baa38ff6387f40cb3.tar.bz2
samba-266ec4aac04cb8666234f18baa38ff6387f40cb3.zip
Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett (This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
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) {