mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
fs/aio: Fix one additional place where the errno variable is being accessed inappropriately.
This commit is contained in:
+6
-9
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user