udhcpc: code shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 3 Nov 2018 22:34:03 +0000 (23:34 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 3 Nov 2018 22:34:35 +0000 (23:34 +0100)
function                                             old     new   delta
perform_release                                      112     172     +60
send_release                                          81       -     -81
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 60/-81)            Total: -21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/d6_dhcpc.c
networking/udhcp/dhcpc.c

index e2f8a6a9cc73dcc60f96197af6763404ac024a8f..3c6129249891209f7024ecd70e87e3182aada5b5 100644 (file)
@@ -814,7 +814,9 @@ static NOINLINE int send_d6_renew(uint32_t xid, struct in6_addr *server_ipv6, st
 }
 
 /* Unicast a DHCP release message */
-static int send_d6_release(struct in6_addr *server_ipv6, struct in6_addr *our_cur_ipv6)
+static
+ALWAYS_INLINE /* one caller, help compiler to use this fact */
+int send_d6_release(struct in6_addr *server_ipv6, struct in6_addr *our_cur_ipv6)
 {
        struct d6_packet packet;
        uint8_t *opt_ptr;
index d2f1659047972e20c1a58ddf457daeec7f08ce8d..4b23e4d39b7b4cbccd3d062d43835d146f5ba5d1 100644 (file)
@@ -850,7 +850,9 @@ static NOINLINE int send_decline(/*uint32_t xid,*/ uint32_t server, uint32_t req
 #endif
 
 /* Unicast a DHCP release message */
-static int send_release(uint32_t server, uint32_t ciaddr)
+static
+ALWAYS_INLINE /* one caller, help compiler to use this fact */
+int send_release(uint32_t server, uint32_t ciaddr)
 {
        struct dhcp_packet packet;