1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r17633: 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
(This used to be commit 6fd6239a0f)
This commit is contained in:
Andrew Bartlett 2006-08-20 21:57:08 +00:00 committed by Gerald (Jerry) Carter
parent ff5120ea1f
commit 3d603bdd66

View File

@ -125,6 +125,10 @@ _PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint)
ret = read(fd, data + offset, hint);
if (ret == 0) {
return NULL;
}
if (ret == -1) {
talloc_free(data);
return NULL;