fs/aio: Fix one additional place where the errno variable is being accessed inappropriately.

This commit is contained in:
Gregory Nutt 2018-01-31 09:19:19 -06:00
parent a5cb1129f9
commit a959d7fefa

View file

@ -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 */