git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b9475c
)
minor fix to write_data() for EOF handling
author
Andrew Tridgell
<tridge@samba.org>
Mon, 12 Aug 1996 12:15:03 +0000
(12:15 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 12 Aug 1996 12:15:03 +0000
(12:15 +0000)
source/lib/util.c
patch
|
blob
|
history
diff --git
a/source/lib/util.c
b/source/lib/util.c
index 8c221a23b6c8a82416e5c343c4642cf204fc1984..6a4861981d44e65e888bc1b979265f112538a020 100644
(file)
--- a/
source/lib/util.c
+++ b/
source/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;
}