Skip to content
Snippets Groups Projects
Commit a959d7fe authored by Gregory Nutt's avatar Gregory Nutt
Browse files

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

parent a5cb1129
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment