zhhyu7 opened a new pull request, #21574:
URL: https://github.com/apache/nuttx/pull/21574

   standardize the naming of structure members.
   
   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   Standardize the member naming of the common connection structure    
   `struct socket_conn_s` by adding an `s_` prefix to its three members:
                                                                             
   | Before      | After        |                                            
   |-------------|--------------|
   | `node`      | `s_node`     |
   | `list`      | `s_list`     |                                            
   | `list_tail` | `s_listtail` |                                            
                                                                             
   `socket_conn_s` is the common prologue embedded at the head of every      
   per-protocol connection structure (TCP/UDP/ICMP/ICMPv6/PKT/CAN/Netlink/
   Bluetooth/IEEE802.15.4/usrsock/local). Its members `node`, `list` and     
   `list_tail` had generic names that are easy to collide/confuse with
   local variables and with members of the enclosing protocol structures.    
   Prefixing them with `s_` (consistent with the other `s_*` members of the
   same structure, e.g. `s_lock`, `s_flags`, `s_options`) makes the common
   base members unambiguous and self-describing at every use site.
   
   This is a pure, mechanical rename. There is no functional or behavioral
   change and no change to memory layout.
   
   ## Impact
   
   - No functional change; identical runtime behavior.
   - No ABI/layout change (same fields, same order, only names differ).
   - Source-compatible for in-tree users (all updated in this PR). Any
     out-of-tree code directly referencing `sconn.node` / `sconn.list` /
     `sconn.list_tail` must switch to the `s_`-prefixed names.
   
   ## Testing
   
   - Build: `sim:nettest` configured and built successfully
     (`make -j` produces `nuttx`, no errors, no new warnings from the
     touched files). This config exercises the TCP/UDP/ICMP/ICMPv6/PKT
     connection code paths that were renamed.
   - nxstyle/checkpatch: the lines changed by this commit introduce no new
     style violations. (Pre-existing, unrelated style notes in
     `ieee802154_conn.c`, `pkt_conn.c`, `udp_conn.c` are not touched by this
     change.)
   
   Since the changes cover a wide scope and only involve renaming variables
    without altering any code logic, no specific test cases were executed.


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

  • [PR] net: add s_ prefix for n... zhhyu7 (via GitHub) via commits

Reply via email to