dhcpv4: move the remaining forward declaration
authorDavid Härdeman <[email protected]>
Wed, 24 Sep 2025 13:42:02 +0000 (15:42 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Fri, 3 Oct 2025 10:54:10 +0000 (12:54 +0200)
Down to where it is clearer why it is needed (there's a circular dependency
between dhcpv4_fr_delay_timer() and dhcpv4_fr_rand_delay()).

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/264
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv4.c

index a09c4609f7a0b814eec3c58d0df2c231c91b432a..0416bae286ed8b6c182f5539ea29abaa3b7d1c63 100644 (file)
@@ -40,8 +40,6 @@
                                 DHCPV4_MIN_PACKET_SIZE : (uint8_t *)end - (uint8_t *)start)
 #define MAX_PREFIX_LEN 28
 
-static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a);
-
 static uint32_t serial = 0;
 
 struct odhcpd_ref_ip {
@@ -270,6 +268,8 @@ static void dhcpv4_fr_start(struct dhcp_assignment *a)
        dhcpv4_fr_send(a);
 }
 
+static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a);
+
 static void dhcpv4_fr_delay_timer(struct uloop_timeout *event)
 {
        struct dhcp_assignment *a = container_of(event, struct dhcp_assignment, fr_timer);