This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit a454cf4d9428088df0c8d68706efc341169ad212
Author: likun17 <[email protected]>
AuthorDate: Tue Mar 4 17:16:49 2025 +0800

    system/uorb: uorb_listener flush functionality optimization.
    
    uorb/listener:Added flush failure prompt information.
    
    Signed-off-by: likun17 <[email protected]>
---
 system/uorb/listener.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/system/uorb/listener.c b/system/uorb/listener.c
index 0795dcb2f..8cd63b098 100644
--- a/system/uorb/listener.c
+++ b/system/uorb/listener.c
@@ -559,13 +559,13 @@ static void listener_flush_topic(FAR const struct 
listen_list_s *objlist,
   int ret;
 
   fds = calloc(nb_objects, sizeof(struct pollfd));
-  if (!fds)
+  if (fds == NULL)
     {
       return;
     }
 
   result = calloc(nb_objects, sizeof(int8_t));
-  if (!result)
+  if (result == NULL)
     {
       free(fds);
       return;
@@ -598,6 +598,8 @@ static void listener_flush_topic(FAR const struct 
listen_list_s *objlist,
       if (ret < 0)
         {
           result[i] = ret;
+          uorbinfo_raw("topic [%s%d] call flush failed! return:%d\n",
+                       tmp->object.meta->o_name, tmp->object.instance, ret);
         }
       else
         {

Reply via email to