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:
parent
ff5120ea1f
commit
3d603bdd66
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user