summaryrefslogtreecommitdiffhomepage
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 13:03:03 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-30 13:03:03 +0100
commit965b795b87c59ed45cc7f16a62301dbae65b1627 (patch)
tree958e486f4f23177746ddee11913d3b59ff4e7f8e /networking
parent2fba2f5bb99145eaa1635fe5a162426158d56a2c (diff)
decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly
text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ifplugd.c2
-rw-r--r--networking/interface.c2
-rw-r--r--networking/ip.c2
-rw-r--r--networking/libiproute/rt_names.c2
-rw-r--r--networking/route.c6
-rw-r--r--networking/tls.c2
-rw-r--r--networking/udhcp/dhcpd.c2
7 files changed, 9 insertions, 9 deletions
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 60916eae6..18dcaff96 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -304,7 +304,7 @@ static const char api_modes[] ALIGN1 = "empwia";
static const struct {
const char *name;
smallint (*func)(void);
-} method_table[] = {
+} method_table[] ALIGN_PTR = {
{ "SIOCETHTOOL" , &detect_link_ethtool },
{ "SIOCGMIIPHY" , &detect_link_mii },
{ "SIOCDEVPRIVATE" , &detect_link_priv },
diff --git a/networking/interface.c b/networking/interface.c
index e5e55d8d4..ea6a2c8a8 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -746,7 +746,7 @@ static const struct hwtype *const hwtypes[] = {
};
#ifdef IFF_PORTSEL
-static const char *const if_port_text[] = {
+static const char *const if_port_text[] ALIGN_PTR = {
/* Keep in step with <linux/netdevice.h> */
"unknown",
"10base2",
diff --git a/networking/ip.c b/networking/ip.c
index 33bea5f49..85b1ba080 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -400,7 +400,7 @@ int ip_main(int argc UNUSED_PARAM, char **argv)
IF_FEATURE_IP_RULE("rule\0")
IF_FEATURE_IP_NEIGH("neigh\0")
;
- static const ip_func_ptr_t ip_func_ptrs[] = {
+ static const ip_func_ptr_t ip_func_ptrs[] ALIGN_PTR = {
ip_print_help,
IF_FEATURE_IP_ADDRESS(do_ipaddr,)
IF_FEATURE_IP_ROUTE(do_iproute,)
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c
index 51f2e9bdb..3c2fad912 100644
--- a/networking/libiproute/rt_names.c
+++ b/networking/libiproute/rt_names.c
@@ -77,7 +77,7 @@ static rtnl_tab_t *rtnl_rtprot_tab;
static void rtnl_rtprot_initialize(void)
{
- static const char *const init_tab[] = {
+ static const char *const init_tab[] ALIGN_PTR = {
"none",
"redirect",
"kernel",
diff --git a/networking/route.c b/networking/route.c
index 4d9aad6cc..4901109f1 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -460,9 +460,9 @@ static NOINLINE void INET6_setroute(int action, char **args)
#endif
static const
-IF_NOT_FEATURE_IPV6(uint16_t)
-IF_FEATURE_IPV6(unsigned)
-flagvals[] = { /* Must agree with flagchars[]. */
+IF_NOT_FEATURE_IPV6(uint16_t flagvals[] ALIGN2 = )
+IF_FEATURE_IPV6(uint32_t flagvals[] ALIGN4 = )
+{ /* Must agree with flagchars[]. */
RTF_UP,
RTF_GATEWAY,
RTF_HOST,
diff --git a/networking/tls.c b/networking/tls.c
index 341225207..e34acd69f 100644
--- a/networking/tls.c
+++ b/networking/tls.c
@@ -1953,7 +1953,7 @@ static void send_client_key_exchange(tls_state_t *tls)
premaster_size = sizeof(rsa_premaster);
} else {
/* ECDHE */
- static const uint8_t basepoint9[CURVE25519_KEYSIZE] = {9};
+ static const uint8_t basepoint9[CURVE25519_KEYSIZE] ALIGN1 = {9};
uint8_t privkey[CURVE25519_KEYSIZE]; //[32]
if (!(tls->flags & GOT_EC_KEY))
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index acfdaa8c3..de16cf955 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -398,7 +398,7 @@ struct config_keyword {
#define OFS(field) offsetof(struct server_data_t, field)
-static const struct config_keyword keywords[] = {
+static const struct config_keyword keywords[] ALIGN_PTR = {
/* keyword handler variable address default */
{"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"},
{"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"},