diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-21 12:33:10 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-10-21 12:33:10 +0200 |
commit | 0bb35e19a73ecbb9694172300a5530dbb8156bb4 (patch) | |
tree | a6f0e38398ffaf4db6bfab8ce97584359dbc3f83 /networking/udhcp/dhcpd.c | |
parent | 08187356d7f6a79d5fb4aa83b90476997e585ad3 (diff) | |
download | busybox-w32-0bb35e19a73ecbb9694172300a5530dbb8156bb4.tar.gz busybox-w32-0bb35e19a73ecbb9694172300a5530dbb8156bb4.tar.bz2 busybox-w32-0bb35e19a73ecbb9694172300a5530dbb8156bb4.zip |
udhcpd: reduce stack usage by ~700 bytes. +28 bytes code size
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r-- | networking/udhcp/dhcpd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 043220de9..f0878652c 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -132,7 +132,8 @@ static uint32_t select_lease_time(struct dhcp_packet *packet) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | /* We got a DHCP DISCOVER. Send an OFFER. */ | 134 | /* We got a DHCP DISCOVER. Send an OFFER. */ |
135 | static void send_offer(struct dhcp_packet *oldpacket, uint32_t static_lease_nip, struct dyn_lease *lease) | 135 | /* NOINLINE: limit stack usage in caller */ |
136 | static NOINLINE void send_offer(struct dhcp_packet *oldpacket, uint32_t static_lease_nip, struct dyn_lease *lease) | ||
136 | { | 137 | { |
137 | struct dhcp_packet packet; | 138 | struct dhcp_packet packet; |
138 | uint32_t lease_time_sec; | 139 | uint32_t lease_time_sec; |
@@ -202,7 +203,8 @@ static void send_offer(struct dhcp_packet *oldpacket, uint32_t static_lease_nip, | |||
202 | send_packet(&packet, /*force_bcast:*/ 0); | 203 | send_packet(&packet, /*force_bcast:*/ 0); |
203 | } | 204 | } |
204 | 205 | ||
205 | static void send_NAK(struct dhcp_packet *oldpacket) | 206 | /* NOINLINE: limit stack usage in caller */ |
207 | static NOINLINE void send_NAK(struct dhcp_packet *oldpacket) | ||
206 | { | 208 | { |
207 | struct dhcp_packet packet; | 209 | struct dhcp_packet packet; |
208 | 210 | ||
@@ -212,7 +214,8 @@ static void send_NAK(struct dhcp_packet *oldpacket) | |||
212 | send_packet(&packet, /*force_bcast:*/ 1); | 214 | send_packet(&packet, /*force_bcast:*/ 1); |
213 | } | 215 | } |
214 | 216 | ||
215 | static void send_ACK(struct dhcp_packet *oldpacket, uint32_t yiaddr) | 217 | /* NOINLINE: limit stack usage in caller */ |
218 | static NOINLINE void send_ACK(struct dhcp_packet *oldpacket, uint32_t yiaddr) | ||
216 | { | 219 | { |
217 | struct dhcp_packet packet; | 220 | struct dhcp_packet packet; |
218 | uint32_t lease_time_sec; | 221 | uint32_t lease_time_sec; |
@@ -243,7 +246,8 @@ static void send_ACK(struct dhcp_packet *oldpacket, uint32_t yiaddr) | |||
243 | } | 246 | } |
244 | } | 247 | } |
245 | 248 | ||
246 | static void send_inform(struct dhcp_packet *oldpacket) | 249 | /* NOINLINE: limit stack usage in caller */ |
250 | static NOINLINE void send_inform(struct dhcp_packet *oldpacket) | ||
247 | { | 251 | { |
248 | struct dhcp_packet packet; | 252 | struct dhcp_packet packet; |
249 | 253 | ||