Re: [PATCH net-next 04/11] tools: ynl-gen: define count iterator in print_dump()

Jakub Kicinski <[email protected]>
Newsgroups com.zx2c4.lists.wireguard,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On Thu,  4 Sep 2025 22:01:27 +0000 Asbjørn Sloth Tønnesen wrote:
> In wireguard_get_device_dump(), as generated by print_dump(),
> it didn't generate a declaration of `unsigned int i`:
> 
> $ make -C tools/net/ynl/generated wireguard-user.o
> -e      CC wireguard-user.o
> wireguard-user.c: In function ‘wireguard_get_device_dump’:
> wireguard-user.c:502:22: error: ‘i’ undeclared (first use in this fn)
>   502 |                 for (i = 0; i < req->_count.peers; i++)
>       |                      ^
> 
> Copy the logic from print_req() as it correctly generated the
> iterator in wireguard_set_device().

Reviewed-by: Jakub Kicinski <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.