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

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

commit 3f8f7f788032d906c08de16eef90fb8401dd62ab
Author: likun17 <[email protected]>
AuthorDate: Tue Nov 17 15:47:43 2026 +0800

    system/uorb/listener: Fix nxstyle errors.
    
    Fix the existing nxstyle errors in listener.c so that the following
    changes to this file pass the style check:
    * Indent the getopt() switch block in main() as required by the
      coding standard.
    * Add the missing blank lines after two declarations.
    
    No functional change.
    
    Signed-off-by: likun17 <[email protected]>
---
 system/uorb/listener.c | 126 +++++++++++++++++++++++++------------------------
 1 file changed, 64 insertions(+), 62 deletions(-)

diff --git a/system/uorb/listener.c b/system/uorb/listener.c
index 2fd1e532d..8df5e31f6 100644
--- a/system/uorb/listener.c
+++ b/system/uorb/listener.c
@@ -332,6 +332,7 @@ static int listener_update(FAR struct listen_list_s 
*objlist,
       delta_generation = state.generation - old->generation;
 
       unsigned long frequency = 0;
+
       if (delta_generation && delta_time)
         {
           frequency = (state.max_frequency ? state.max_frequency : 1000000)
@@ -504,6 +505,7 @@ static int listener_generate_object_list(FAR struct 
listen_list_s *objlist,
            */
 
           FAR const char *str = strstr(filter, name);
+
           if (!str || (str[len] && str[len] != ',' &&
                        str[len] != object.instance + '0'))
             {
@@ -1097,68 +1099,68 @@ int main(int argc, FAR char *argv[])
   while ((ch = getopt(argc, argv, "r:b:n:t:Tfslhiu")) != EOF)
     {
       switch (ch)
-      {
-        case 'r':
-          topic_rate = atof(optarg);
-          if (topic_rate < 0)
-            {
-              goto error;
-            }
-          break;
-
-        case 'b':
-          topic_latency = strtol(optarg, NULL, 0);
-          if (topic_latency < 0)
-            {
-              goto error;
-            }
-          break;
-
-        case 'n':
-          nb_msgs = strtol(optarg, NULL, 0);
-          if (nb_msgs < 0)
-            {
-              goto error;
-            }
-          break;
-
-        case 't':
-          timeout = strtol(optarg, NULL, 0);
-          if (timeout < 0)
-            {
-              goto error;
-            }
-          break;
-
-#ifdef CONFIG_UORB_FORMAT
-        case 's':
-          record = true;
-          break;
-#endif
-
-        case 'f':
-          flush = true;
-          break;
-
-        case 'T':
-          top = true;
-          break;
-
-        case 'l':
-          only_once = true;
-          break;
-
-        case 'i':
-          info = true;
-          break;
-
-        case 'u':
-          nonwakeup = true;
-          break;
-
-        case 'h':
-        default:
-          goto error;
+        {
+          case 'r':
+            topic_rate = atof(optarg);
+            if (topic_rate < 0)
+              {
+                goto error;
+              }
+            break;
+
+          case 'b':
+            topic_latency = strtol(optarg, NULL, 0);
+            if (topic_latency < 0)
+              {
+                goto error;
+              }
+            break;
+
+          case 'n':
+            nb_msgs = strtol(optarg, NULL, 0);
+            if (nb_msgs < 0)
+              {
+                goto error;
+              }
+            break;
+
+          case 't':
+            timeout = strtol(optarg, NULL, 0);
+            if (timeout < 0)
+              {
+                goto error;
+              }
+            break;
+
+  #ifdef CONFIG_UORB_FORMAT
+          case 's':
+            record = true;
+            break;
+  #endif
+
+          case 'f':
+            flush = true;
+            break;
+
+          case 'T':
+            top = true;
+            break;
+
+          case 'l':
+            only_once = true;
+            break;
+
+          case 'i':
+            info = true;
+            break;
+
+          case 'u':
+            nonwakeup = true;
+            break;
+
+          case 'h':
+          default:
+            goto error;
         }
     }
 

Reply via email to