Thread (55 messages) 55 messages, 6 authors, 2025-09-11

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

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2025-09-05 10:54:02
Also in: lkml

Asbjørn Sloth Tønnesen [off-list ref] writes:
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().

Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help