acassis commented on code in PR #20107:
URL: https://github.com/apache/nuttx/pull/20107#discussion_r3983387534


##########
fs/aio/aio_cancel.c:
##########
@@ -83,18 +84,23 @@
 
 int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
 {
-  if (fildes < 0)
-    {
-      set_errno(EBADF);
-      return ERROR;
-    }
-
   FAR struct aio_container_s *aioc;
   FAR struct aio_container_s *next;
+  FAR struct file            *filep;
+
   pid_t pid;
   int status;
   int ret;
 
+  ret = file_get(fildes, &filep);

Review Comment:
   good catch, we don't need to check if fildes < 0 because fdlist_get2 already 
checks it



-- 
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]

Reply via email to