fs/aio: Fix one additional place where the errno variable is being accessed inappropriately.
This commit is contained in:
parent
a5cb1129f9
commit
a959d7fefa
1 changed files with 6 additions and 9 deletions
|
@ -128,19 +128,16 @@ static void aio_read_worker(FAR void *arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Set the result of the read */
|
||||
/* Set the result of the read operation. */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS_ERROR
|
||||
if (nread < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
ferr("ERROR: pread failed: %d\n", errcode);
|
||||
DEBUGASSERT(errcode > 0);
|
||||
aiocbp->aio_result = -errcode;
|
||||
}
|
||||
else
|
||||
{
|
||||
aiocbp->aio_result = nread;
|
||||
ferr("ERROR: read failed: %d\n", (int)nread);
|
||||
}
|
||||
#endif
|
||||
|
||||
aiocbp->aio_result = nread;
|
||||
|
||||
/* Signal the client */
|
||||
|
||||
|
|
Loading…
Reference in a new issue