Skip to content

Conversation

@zhhyu7
Copy link
Contributor

@zhhyu7 zhhyu7 commented Feb 2, 2026

Summary

removes redundant type casts in ARP-related network library functions. The casts from req.arp_dev (already a char array) to (FAR char *) are unnecessary and can be safely removed.

Impact

Code cleanup only, no functional changes;
Improves code readability by removing unnecessary casts.

Testing

sim:matter

  • [*] Build tested
  • [*] Functional testing of ARP commands
    NuttX test log
NuttShell (NSH) NuttX-12.12.0
MOTD: username=admin password=Administrator
nsh> 
nsh> arp
IP Address   Ethernet Address  Interface
nsh> help arp
arp usage:  arp [-i <ifname>] [-a <ipaddr>|-d <ipaddr>|-s <ipaddr> <hwaddr>]
nsh> arp -i eth0 -s 10.0.1.3 00:11:22:33:44:55
nsh> arp
IP Address   Ethernet Address  Interface
10.0.1.3     00:11:22:33:44:55 eth0
nsh> arp -i eth0
IP Address   Ethernet Address  Interface
10.0.1.3     00:11:22:33:44:55 eth0
nsh> arp -a 10.0.1.3
HWaddr: 00:11:22:33:44:55
nsh> arp -d 10.0.1.3
nsh> arp -a 10.0.1.3
nsh: arp: no such ARP entry: 10.0.1.3
nsh> arp -i eth0
IP Address   Ethernet Address  Interface
nsh> arp
IP Address   Ethernet Address  Interface
nsh> 

removes redundant type casts in ARP-related network library functions.
The casts from req.arp_dev (already a char array) to (FAR char *)
are unnecessary and can be safely removed.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit d48b450 into apache:master Feb 3, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants