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
+5 -8
View File
@@ -128,19 +128,16 @@ static void aio_read_worker(FAR void *arg)
} }
#endif #endif
/* Set the result of the read */ /* Set the result of the read operation. */
#ifdef CONFIG_DEBUG_FS_ERROR
if (nread < 0) if (nread < 0)
{ {
int errcode = get_errno(); ferr("ERROR: read failed: %d\n", (int)nread);
ferr("ERROR: pread failed: %d\n", errcode);
DEBUGASSERT(errcode > 0);
aiocbp->aio_result = -errcode;
} }
else #endif
{
aiocbp->aio_result = nread; aiocbp->aio_result = nread;
}
/* Signal the client */ /* Signal the client */