[git commit] udhcpc: code shrink
Denys Vlasenko
vda.linux at googlemail.com
Sat Nov 3 22:34:35 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=9d05ad087e1cb1295463ea1133bb619b67125f1d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
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 at googlemail.com>
---
networking/udhcp/d6_dhcpc.c | 4 +++-
networking/udhcp/dhcpc.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index e2f8a6a9c..3c6129249 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -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;
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index d2f165904..4b23e4d39 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -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;
More information about the busybox-cvs
mailing list