diff options
| author | David Härdeman | 2025-09-24 13:18:13 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-10-03 10:53:45 +0000 |
| commit | 2a8dd31261b66638cc79c1b6c1775cb4d2f25e4f (patch) | |
| tree | 5fe732cc00820f6bfd5813e854e8c4e28877cfeb | |
| parent | 869e2942f3f1484693b1d0937d387355e0a686cb (diff) | |
| download | odhcpd-2a8dd31261b66638cc79c1b6c1775cb4d2f25e4f.tar.gz | |
dhcpv4: move dhcpv4_free_assignment()
Move dhcpv4_free_assignment() further down so it is grouped with the functions
creating the assignment.
Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/264
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/dhcpv4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c index ee5a882..01da373 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -151,12 +151,6 @@ static char *dhcpv4_msg_to_string(uint8_t reqmsg) } } -static void dhcpv4_free_assignment(struct dhcp_assignment *a) -{ - if (a->fr_ip) - dhcpv4_fr_stop(a); -} - static void dhcpv4_put(struct dhcpv4_message *msg, uint8_t **cookie, uint8_t type, uint8_t len, const void *data) { @@ -726,6 +720,12 @@ static void dhcpv4_handle_dgram(void *addr, void *data, size_t len, dhcpv4_handle_msg(addr, data, len, iface, dest_addr, dhcpv4_send_reply, &sock); } +static void dhcpv4_free_assignment(struct dhcp_assignment *a) +{ + if (a->fr_ip) + dhcpv4_fr_stop(a); +} + static bool dhcpv4_insert_assignment(struct list_head *list, struct dhcp_assignment *a, uint32_t addr) { |