Module: wine Branch: master Commit: 956487434d02c1911a942bed1a3949719fe54d53 URL: http://source.winehq.org/git/wine.git/?a=commit;h=956487434d02c1911a942bed1a...
Author: Marcus Meissner meissner@suse.de Date: Tue Aug 30 16:41:29 2011 +0200
ntdll: Handle errno also for non ENOENT errors on lseek (Coverity).
---
dlls/ntdll/directory.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 548189c..5d6d2cc 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1547,9 +1547,9 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U else { old_pos = lseek( fd, 0, SEEK_CUR ); - if (old_pos == -1 && errno == ENOENT) + if (old_pos == -1) { - io->u.Status = STATUS_NO_MORE_FILES; + io->u.Status = (errno == ENOENT) ? STATUS_NO_MORE_FILES : FILE_GetNtStatus(); res = 0; goto done; }