diff options
author | Jeremy Allison <jra@samba.org> | 2008-12-31 18:06:57 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-12-31 18:06:57 -0800 |
commit | 07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00 (patch) | |
tree | 412f448d68b4b0f36c5b330a1f3eef77acf12a2f /source3/client | |
parent | bb23f5725f538d14b2ccec0463cfb1136be3ebd0 (diff) | |
download | samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.gz samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.bz2 samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.zip |
Fix all warnings in source3 with gcc4.3.
Jeremy.
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 7ad8a73e9c..18edf037e2 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -329,13 +329,13 @@ static int dotarbuf(int f, char *b, int n) diff=tbufsiz-tp; memcpy(tarbuf + tp, b, diff); - fail=fail && (1+write(f, tarbuf, tbufsiz)); + fail=fail && (1+sys_write(f, tarbuf, tbufsiz)); n-=diff; b+=diff; tp=0; while (n >= tbufsiz) { - fail=fail && (1 + write(f, b, tbufsiz)); + fail=fail && (1 + sys_write(f, b, tbufsiz)); n-=tbufsiz; b+=tbufsiz; } @@ -364,7 +364,10 @@ static void dozerobuf(int f, int n) if (n+tp >= tbufsiz) { memset(tarbuf+tp, 0, tbufsiz-tp); - write(f, tarbuf, tbufsiz); + if (sys_write(f, tarbuf, tbufsiz) != tbufsiz) { + DEBUG(0, ("dozerobuf: sys_write fail\n")); + return; + } memset(tarbuf, 0, (tp+=n-tbufsiz)); } else { memset(tarbuf+tp, 0, n); @@ -408,8 +411,12 @@ static void dotareof(int f) /* Could be a pipe, in which case S_ISREG should fail, * and we should write out at full size */ - if (tp > 0) - write(f, tarbuf, S_ISREG(stbuf.st_mode) ? tp : tbufsiz); + if (tp > 0) { + size_t towrite = S_ISREG(stbuf.st_mode) ? tp : tbufsiz; + if (sys_write(f, tarbuf, towrite) != towrite) { + DEBUG(0,("dotareof: sys_write fail\n")); + } + } } /**************************************************************************** |