diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-12 12:15:03 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-12 12:15:03 +0000 |
commit | 5e94d5aa2251973774e5cfab6bcf2724595c7cd7 (patch) | |
tree | 96006ce524fc9e6059b718f4d971617bbd63b76b /source3 | |
parent | 02b98a8965a60a7c3394835ff01074fc88ffbb89 (diff) | |
download | samba-5e94d5aa2251973774e5cfab6bcf2724595c7cd7.tar.gz samba-5e94d5aa2251973774e5cfab6bcf2724595c7cd7.tar.bz2 samba-5e94d5aa2251973774e5cfab6bcf2724595c7cd7.zip |
minor fix to write_data() for EOF handling
(This used to be commit 3a7c2d9dfaf01e616adbc896dfc853a45c824170)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 8c221a23b6..6a4861981d 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1872,8 +1872,8 @@ int write_data(int fd,char *buffer,int N) { ret = write(fd,buffer + total,N - total); - if (ret <= 0) - return total; + if (ret == -1) return -1; + if (ret == 0) return total; total += ret; } |