svn commit: samba r17633 - in branches/SAMBA_4_0/source/lib/util: .

abartlet at samba.org abartlet at samba.org
Sun Aug 20 21:57:08 GMT 2006


Author: abartlet
Date: 2006-08-20 21:57:08 +0000 (Sun, 20 Aug 2006)
New Revision: 17633

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17633

Log:
Return NULL at the end of the file, or else we can't tell the
difference between end of file and a blank line.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/util/util_file.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/util_file.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util_file.c	2006-08-20 21:23:47 UTC (rev 17632)
+++ branches/SAMBA_4_0/source/lib/util/util_file.c	2006-08-20 21:57:08 UTC (rev 17633)
@@ -125,6 +125,10 @@
 
 		ret = read(fd, data + offset, hint);
 
+		if (ret == 0) {
+			return NULL;
+		}
+
 		if (ret == -1) {
 			talloc_free(data);
 			return NULL;



More information about the samba-cvs mailing list