From 5e94d5aa2251973774e5cfab6bcf2724595c7cd7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 12 Aug 1996 12:15:03 +0000 Subject: minor fix to write_data() for EOF handling (This used to be commit 3a7c2d9dfaf01e616adbc896dfc853a45c824170) --- source3/lib/util.c | 4 ++-- 1 file 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; } -- cgit