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.git

commit d79348bf46f785f3f60c77840e3ce5c088ea5974
Author: raiden00pl <[email protected]>
AuthorDate: Thu Oct 22 18:17:28 2026 +0200

    net/can/can_getsockopt.c: Fix nxstyle issues.
    
    Fix brace and comment alignment and add the missing blank line after
    a declaration reported by tools/nxstyle.c.  No functional change.
    
    Assisted-by: Claude:claude-opus-5-5
    Signed-off-by: raiden00pl <[email protected]>
---
 net/can/can_getsockopt.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/net/can/can_getsockopt.c b/net/can/can_getsockopt.c
index 72e44af7d68..266e3be00d7 100644
--- a/net/can/can_getsockopt.c
+++ b/net/can/can_getsockopt.c
@@ -136,6 +136,7 @@ int can_getsockopt(FAR struct socket *psock, int level, int 
option,
         else
           {
             FAR can_err_mask_t *mask = (FAR can_err_mask_t *)value;
+
             *mask = conn->err_mask;
             *value_len = sizeof(can_err_mask_t);
           }
@@ -157,7 +158,7 @@ int can_getsockopt(FAR struct socket *psock, int level, int 
option,
         if (*value_len < sizeof(int))
           {
             return -EINVAL;
-         }
+          }
 
         /* Sample the current options.  This is atomic operation and so
          * should not require any special steps for thread safety. We
@@ -165,9 +166,9 @@ int can_getsockopt(FAR struct socket *psock, int level, int 
option,
          * a macro will do.
          */
 
-          *(FAR int *)value = _SO_GETOPT(conn->sconn.s_options, option);
-          *value_len        = sizeof(int);
-          break;
+        *(FAR int *)value = _SO_GETOPT(conn->sconn.s_options, option);
+        *value_len        = sizeof(int);
+        break;
 
 #if CONFIG_NET_RECV_BUFSIZE > 0
       case SO_RCVBUF:
@@ -188,13 +189,13 @@ int can_getsockopt(FAR struct socket *psock, int level, 
int option,
 #if CONFIG_NET_SEND_BUFSIZE > 0
       case SO_SNDBUF:
         /* Verify that option is the size of an 'int'.  Should also check
-          * that 'value' is properly aligned for an 'int'
-          */
+         * that 'value' is properly aligned for an 'int'
+         */
 
         if (*value_len < sizeof(int))
           {
             return -EINVAL;
-        }
+          }
 
         *(FAR int *)value = conn->sndbufs;
         break;

Reply via email to