projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01f571d
)
ubus: minor correctness fix
author
David Härdeman
<
[email protected]
>
Sat, 4 Oct 2025 17:50:17 +0000
(19:50 +0200)
committer
Álvaro Fernández Rojas
<
[email protected]
>
Tue, 7 Oct 2025 08:52:24 +0000
(10:52 +0200)
Now, blobmsg_close_table() and blobmsg_close_array() happen to be identical, so
the actual code doesn't change at all, but this still caused me some
headscratching when I first saw it.
Signed-off-by: David Härdeman <
[email protected]
>
Link:
https://github.com/openwrt/odhcpd/pull/267
Signed-off-by: Álvaro Fernández Rojas <
[email protected]
>
src/ubus.c
patch
|
blob
|
history
diff --git
a/src/ubus.c
b/src/ubus.c
index 82c580638a016040d56f49f03b39992d0a0c495a..13a74cc4fbd94c2ccb1c103707bbe344e9d9cec4 100644
(file)
--- a/
src/ubus.c
+++ b/
src/ubus.c
@@
-161,7
+161,7
@@
static int handle_dhcpv6_leases(_unused struct ubus_context *ctx, _unused struct
m = blobmsg_open_array(&b, a->flags & OAF_DHCPV6_NA ? "ipv6-addr": "ipv6-prefix");
dhcpv6_ia_enum_addrs(iface, a, now, dhcpv6_blobmsg_ia_addr, NULL);
- blobmsg_close_
table
(&b, m);
+ blobmsg_close_
array
(&b, m);
blobmsg_add_u32(&b, "valid", INFINITE_VALID(a->valid_until) ?
(uint32_t)-1 : (uint32_t)(a->valid_until - now));