pkarashchenko commented on code in PR #9664:
URL: https://github.com/apache/nuttx/pull/9664#discussion_r1249445108
##########
libs/libc/aio/lio_listio.c:
##########
@@ -293,6 +263,36 @@ static int lio_sigsetup(FAR struct aiocb * const *list,
int nent,
return -errcode;
}
+ /* Save this structure as the private data attached to each aiocb */
+
+ for (i = 0; i < nent; i++)
+ {
+ /* Skip over NULL entries in the list */
+
+ aiocbp = list[i];
+ if (aiocbp)
+ {
+ FAR void *priv = NULL;
+
+ /* Check if I/O is pending for this entry */
+
+ if (aiocbp->aio_result == -EINPROGRESS)
+ {
+ priv = lib_zalloc(sizeof(struct lio_sighand_s));
+ if (!priv)
+ {
+ ferr("ERROR: lib_zalloc failed\n");
+ return -ENOMEM;
+ }
+
+ memcpy(priv, (FAR void *) &sighand,
Review Comment:
```suggestion
memcpy(priv, (FAR void *)&sighand,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]