# Re: \[PATCH\] net: bridge: avoid redundant strlen() in show\_backup\_port()

- From: Ido Schimmel \<idosch@nvidia.com\>
- Date: 2026-11-17 17:58:45 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/11/17954666
- Thread: https://ratatoskr.run/bridge/2026/11/17954198/t.md

```text
On Tue, Nov 17, 2026 at 09:49:18AM -0800, Joe Damato wrote:
> On Tue, Nov 17, 2026 at 07:51:06PM +0300, Dmitry Antipov wrote:
> > In store_backup_port(), prefer strchrnul() over strchr() to
> > avoid redundant call to strlen().
> 
> a couple things:
> 
> - i dont't think the change is worth it because it feels like unnecessary
>   churn in a path that isn't a hot path. how many bytes are we really avoiding
>   counting here?
> 
> - commit message mentions store_backup_port but subject line says
>   show_backup_port, so commit would need to be respun
> 
> but imho i think this should be dropped

Yep.

pw-bot: rejected
```
