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

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

commit 34fbaa15eead79bfa466d88e2c5fbef600e93707
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Apr 13 14:36:34 2026 +0800

    net/route: fix return value of net_writeroute_ipv6
    
    Return ntotal (total bytes written) instead of ret (result of last
    write call). This matches the expected semantics and is consistent
    with net_writeroute_ipv4().
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 net/route/net_fileroute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/route/net_fileroute.c b/net/route/net_fileroute.c
index 16f477c95f3..1f30e897c1a 100644
--- a/net/route/net_fileroute.c
+++ b/net/route/net_fileroute.c
@@ -475,7 +475,7 @@ ssize_t net_writeroute_ipv6(FAR struct file *filep,
   while (ntotal < sizeof(struct net_route_ipv6_s));
 
   net_unlockroute_ipv6();
-  return ret;
+  return ntotal;
 }
 #endif
 

Reply via email to