diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
| commit | 6ca409e0e4c198fe3081346eebbae3f068fe605a (patch) | |
| tree | 060cb05d99220a1eda399194d1209c269f0e8cd8 /networking | |
| parent | 4185548984357df91311f30c8e43d95f33922576 (diff) | |
| download | busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2 busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip | |
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
Diffstat (limited to 'networking')
| -rw-r--r-- | networking/arp.c | 2 | ||||
| -rw-r--r-- | networking/ftpgetput.c | 2 | ||||
| -rw-r--r-- | networking/httpd.c | 18 | ||||
| -rw-r--r-- | networking/interface.c | 10 | ||||
| -rw-r--r-- | networking/ip.c | 2 | ||||
| -rw-r--r-- | networking/ipcalc.c | 2 | ||||
| -rw-r--r-- | networking/libiproute/ip_parse_common_args.c | 2 | ||||
| -rw-r--r-- | networking/libiproute/ipaddress.c | 6 | ||||
| -rw-r--r-- | networking/libiproute/iplink.c | 4 | ||||
| -rw-r--r-- | networking/libiproute/iproute.c | 10 | ||||
| -rw-r--r-- | networking/libiproute/iprule.c | 4 | ||||
| -rw-r--r-- | networking/libiproute/iptunnel.c | 4 | ||||
| -rw-r--r-- | networking/libiproute/ll_map.c | 2 | ||||
| -rw-r--r-- | networking/libiproute/ll_map.h | 2 | ||||
| -rw-r--r-- | networking/libiproute/rtm_map.c | 2 | ||||
| -rw-r--r-- | networking/netstat.c | 3 | ||||
| -rw-r--r-- | networking/route.c | 14 | ||||
| -rw-r--r-- | networking/slattach.c | 2 | ||||
| -rw-r--r-- | networking/telnet.c | 2 | ||||
| -rw-r--r-- | networking/tftp.c | 4 | ||||
| -rw-r--r-- | networking/traceroute.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/common.c | 4 | ||||
| -rw-r--r-- | networking/udhcp/dhcpc.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/dumpleases.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/options.c | 2 | ||||
| -rw-r--r-- | networking/vconfig.c | 6 | ||||
| -rw-r--r-- | networking/wget.c | 6 |
27 files changed, 62 insertions, 59 deletions
diff --git a/networking/arp.c b/networking/arp.c index 907433b4a..a5a737349 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
| @@ -46,7 +46,7 @@ static int sockfd; /* active socket descriptor */ | |||
| 46 | static smallint hw_set; /* flag if hw-type was set (-H) */ | 46 | static smallint hw_set; /* flag if hw-type was set (-H) */ |
| 47 | static const char *device = ""; /* current device */ | 47 | static const char *device = ""; /* current device */ |
| 48 | 48 | ||
| 49 | static const char options[] = | 49 | static const char options[] ALIGN1 = |
| 50 | "pub\0" | 50 | "pub\0" |
| 51 | "priv\0" | 51 | "priv\0" |
| 52 | "temp\0" | 52 | "temp\0" |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 02e7c5270..f3d6009dd 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
| @@ -287,7 +287,7 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream, | |||
| 287 | #define FTPGETPUT_OPT_PORT 16 | 287 | #define FTPGETPUT_OPT_PORT 16 |
| 288 | 288 | ||
| 289 | #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS | 289 | #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS |
| 290 | static const char ftpgetput_longopts[] = | 290 | static const char ftpgetput_longopts[] ALIGN1 = |
| 291 | "continue\0" Required_argument "c" | 291 | "continue\0" Required_argument "c" |
| 292 | "verbose\0" No_argument "v" | 292 | "verbose\0" No_argument "v" |
| 293 | "username\0" Required_argument "u" | 293 | "username\0" Required_argument "u" |
diff --git a/networking/httpd.c b/networking/httpd.c index fb3129f0b..b083d645c 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
| @@ -98,8 +98,8 @@ | |||
| 98 | # define PIPE_BUF 4096 | 98 | # define PIPE_BUF 4096 |
| 99 | #endif | 99 | #endif |
| 100 | 100 | ||
| 101 | static const char default_path_httpd_conf[] = "/etc"; | 101 | static const char default_path_httpd_conf[] ALIGN1 = "/etc"; |
| 102 | static const char httpd_conf[] = "httpd.conf"; | 102 | static const char httpd_conf[] ALIGN1 = "httpd.conf"; |
| 103 | 103 | ||
| 104 | #define TIMEOUT 60 | 104 | #define TIMEOUT 60 |
| 105 | 105 | ||
| @@ -202,9 +202,9 @@ struct globals { | |||
| 202 | ContentLength = -1; \ | 202 | ContentLength = -1; \ |
| 203 | } while (0) | 203 | } while (0) |
| 204 | 204 | ||
| 205 | static const char request_GET[] = "GET"; /* size algorithmic optimize */ | 205 | static const char request_GET[] ALIGN1 = "GET"; /* size algorithmic optimize */ |
| 206 | 206 | ||
| 207 | static const char* const suffixTable [] = { | 207 | static const char *const suffixTable[] = { |
| 208 | /* Warning: shorted equivalent suffix in one line must be first */ | 208 | /* Warning: shorted equivalent suffix in one line must be first */ |
| 209 | ".htm.html", "text/html", | 209 | ".htm.html", "text/html", |
| 210 | ".jpg.jpeg", "image/jpeg", | 210 | ".jpg.jpeg", "image/jpeg", |
| @@ -288,7 +288,7 @@ static const HttpEnumString httpResponseNames[] = { | |||
| 288 | }; | 288 | }; |
| 289 | 289 | ||
| 290 | 290 | ||
| 291 | static const char RFC1123FMT[] = "%a, %d %b %Y %H:%M:%S GMT"; | 291 | static const char RFC1123FMT[] ALIGN1 = "%a, %d %b %Y %H:%M:%S GMT"; |
| 292 | 292 | ||
| 293 | 293 | ||
| 294 | #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1) | 294 | #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1) |
| @@ -1268,7 +1268,7 @@ static int sendCgi(const char *url, | |||
| 1268 | * <cr><lf> pair here. We will output "200 OK" line | 1268 | * <cr><lf> pair here. We will output "200 OK" line |
| 1269 | * if needed, but CGI still has to provide blank line | 1269 | * if needed, but CGI still has to provide blank line |
| 1270 | * between header and body */ | 1270 | * between header and body */ |
| 1271 | static const char HTTP_200[] = "HTTP/1.0 200 OK\r\n"; | 1271 | static const char HTTP_200[] ALIGN1 = "HTTP/1.0 200 OK\r\n"; |
| 1272 | 1272 | ||
| 1273 | /* Must use safe_read, not full_read, because | 1273 | /* Must use safe_read, not full_read, because |
| 1274 | * CGI may output a few first bytes and then wait | 1274 | * CGI may output a few first bytes and then wait |
| @@ -1343,9 +1343,9 @@ static int sendCgi(const char *url, | |||
| 1343 | static int sendFile(const char *url) | 1343 | static int sendFile(const char *url) |
| 1344 | { | 1344 | { |
| 1345 | char * suffix; | 1345 | char * suffix; |
| 1346 | int f; | 1346 | int f; |
| 1347 | const char * const * table; | 1347 | const char *const *table; |
| 1348 | const char * try_suffix; | 1348 | const char *try_suffix; |
| 1349 | 1349 | ||
| 1350 | suffix = strrchr(url, '.'); | 1350 | suffix = strrchr(url, '.'); |
| 1351 | 1351 | ||
diff --git a/networking/interface.c b/networking/interface.c index 9e6ed63e0..61ce12ef1 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
| @@ -871,7 +871,7 @@ static int hw_null_address(const struct hwtype *hw, void *ap) | |||
| 871 | return 1; | 871 | return 1; |
| 872 | } | 872 | } |
| 873 | 873 | ||
| 874 | static const char TRext[] = "\0\0\0Ki\0Mi\0Gi\0Ti"; | 874 | static const char TRext[] ALIGN1 = "\0\0\0Ki\0Mi\0Gi\0Ti"; |
| 875 | 875 | ||
| 876 | static void print_bytes_scaled(unsigned long long ull, const char *end) | 876 | static void print_bytes_scaled(unsigned long long ull, const char *end) |
| 877 | { | 877 | { |
| @@ -1020,7 +1020,7 @@ static void ife_print(struct interface *ptr) | |||
| 1020 | if (ptr->flags == 0) { | 1020 | if (ptr->flags == 0) { |
| 1021 | printf("[NO FLAGS] "); | 1021 | printf("[NO FLAGS] "); |
| 1022 | } else { | 1022 | } else { |
| 1023 | static const char ife_print_flags_strs[] = | 1023 | static const char ife_print_flags_strs[] ALIGN1 = |
| 1024 | "UP\0" | 1024 | "UP\0" |
| 1025 | "BROADCAST\0" | 1025 | "BROADCAST\0" |
| 1026 | "DEBUG\0" | 1026 | "DEBUG\0" |
| @@ -1038,7 +1038,7 @@ static void ife_print(struct interface *ptr) | |||
| 1038 | "DYNAMIC\0" | 1038 | "DYNAMIC\0" |
| 1039 | #endif | 1039 | #endif |
| 1040 | ; | 1040 | ; |
| 1041 | static const unsigned short ife_print_flags_mask[] = { | 1041 | static const unsigned short ife_print_flags_mask[] ALIGN2 = { |
| 1042 | IFF_UP, | 1042 | IFF_UP, |
| 1043 | IFF_BROADCAST, | 1043 | IFF_BROADCAST, |
| 1044 | IFF_DEBUG, | 1044 | IFF_DEBUG, |
| @@ -1051,9 +1051,9 @@ static void ife_print(struct interface *ptr) | |||
| 1051 | IFF_ALLMULTI, | 1051 | IFF_ALLMULTI, |
| 1052 | IFF_SLAVE, | 1052 | IFF_SLAVE, |
| 1053 | IFF_MASTER, | 1053 | IFF_MASTER, |
| 1054 | IFF_MULTICAST, | 1054 | IFF_MULTICAST |
| 1055 | #ifdef HAVE_DYNAMIC | 1055 | #ifdef HAVE_DYNAMIC |
| 1056 | IFF_DYNAMIC, | 1056 | ,IFF_DYNAMIC |
| 1057 | #endif | 1057 | #endif |
| 1058 | }; | 1058 | }; |
| 1059 | const unsigned short *mask = ife_print_flags_mask; | 1059 | const unsigned short *mask = ife_print_flags_mask; |
diff --git a/networking/ip.c b/networking/ip.c index bf7e84c53..c82d731c1 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
| @@ -82,7 +82,7 @@ int iptunnel_main(int argc, char **argv) | |||
| 82 | int ip_main(int argc, char **argv); | 82 | int ip_main(int argc, char **argv); |
| 83 | int ip_main(int argc, char **argv) | 83 | int ip_main(int argc, char **argv) |
| 84 | { | 84 | { |
| 85 | static const char keywords[] = | 85 | static const char keywords[] ALIGN1 = |
| 86 | USE_FEATURE_IP_ADDRESS("address\0") | 86 | USE_FEATURE_IP_ADDRESS("address\0") |
| 87 | USE_FEATURE_IP_ROUTE("route\0") | 87 | USE_FEATURE_IP_ROUTE("route\0") |
| 88 | USE_FEATURE_IP_LINK("link\0") | 88 | USE_FEATURE_IP_LINK("link\0") |
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index f3e3ad98f..2a099eff0 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
| @@ -63,7 +63,7 @@ int get_prefix(unsigned long netmask); | |||
| 63 | #define SILENT 0x20 | 63 | #define SILENT 0x20 |
| 64 | 64 | ||
| 65 | #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS | 65 | #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS |
| 66 | static const char ipcalc_longopts[] = | 66 | static const char ipcalc_longopts[] ALIGN1 = |
| 67 | "netmask\0" No_argument "m" | 67 | "netmask\0" No_argument "m" |
| 68 | "broadcast\0" No_argument "b" | 68 | "broadcast\0" No_argument "b" |
| 69 | "network\0" No_argument "n" | 69 | "network\0" No_argument "n" |
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c index 0e429a06f..ff333993f 100644 --- a/networking/libiproute/ip_parse_common_args.c +++ b/networking/libiproute/ip_parse_common_args.c | |||
| @@ -26,7 +26,7 @@ void ip_parse_common_args(int *argcp, char ***argvp) | |||
| 26 | { | 26 | { |
| 27 | int argc = *argcp; | 27 | int argc = *argcp; |
| 28 | char **argv = *argvp; | 28 | char **argv = *argvp; |
| 29 | static const char ip_common_commands[] = | 29 | static const char ip_common_commands[] ALIGN1 = |
| 30 | "-family\0""inet\0""inet6\0""link\0" | 30 | "-family\0""inet\0""inet6\0""link\0" |
| 31 | "-4\0""-6\0""-0\0""-oneline\0"; | 31 | "-4\0""-6\0""-0\0""-oneline\0"; |
| 32 | enum { | 32 | enum { |
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 8874fdb0a..6a5f2cfbd 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
| @@ -412,7 +412,7 @@ static void ipaddr_reset_filter(int _oneline) | |||
| 412 | /* Return value becomes exitcode. It's okay to not return at all */ | 412 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 413 | int ipaddr_list_or_flush(int argc, char **argv, int flush) | 413 | int ipaddr_list_or_flush(int argc, char **argv, int flush) |
| 414 | { | 414 | { |
| 415 | static const char option[] = "to\0""scope\0""up\0""label\0""dev\0"; | 415 | static const char option[] ALIGN1 = "to\0""scope\0""up\0""label\0""dev\0"; |
| 416 | 416 | ||
| 417 | struct nlmsg_list *linfo = NULL; | 417 | struct nlmsg_list *linfo = NULL; |
| 418 | struct nlmsg_list *ainfo = NULL; | 418 | struct nlmsg_list *ainfo = NULL; |
| @@ -599,7 +599,7 @@ static int default_scope(inet_prefix *lcl) | |||
| 599 | /* Return value becomes exitcode. It's okay to not return at all */ | 599 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 600 | static int ipaddr_modify(int cmd, int argc, char **argv) | 600 | static int ipaddr_modify(int cmd, int argc, char **argv) |
| 601 | { | 601 | { |
| 602 | static const char option[] = | 602 | static const char option[] ALIGN1 = |
| 603 | "peer\0""remote\0""broadcast\0""brd\0" | 603 | "peer\0""remote\0""broadcast\0""brd\0" |
| 604 | "anycast\0""scope\0""dev\0""label\0""local\0"; | 604 | "anycast\0""scope\0""dev\0""label\0""local\0"; |
| 605 | struct rtnl_handle rth; | 605 | struct rtnl_handle rth; |
| @@ -768,7 +768,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) | |||
| 768 | /* Return value becomes exitcode. It's okay to not return at all */ | 768 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 769 | int do_ipaddr(int argc, char **argv) | 769 | int do_ipaddr(int argc, char **argv) |
| 770 | { | 770 | { |
| 771 | static const char commands[] = | 771 | static const char commands[] ALIGN1 = |
| 772 | "add\0""delete\0""list\0""show\0""lst\0""flush\0"; | 772 | "add\0""delete\0""list\0""show\0""lst\0""flush\0"; |
| 773 | 773 | ||
| 774 | int command_num = 2; /* default command is list */ | 774 | int command_num = 2; /* default command is list */ |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 69ce84e49..e1c9c6043 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
| @@ -171,7 +171,7 @@ static int do_set(int argc, char **argv) | |||
| 171 | struct ifreq ifr0, ifr1; | 171 | struct ifreq ifr0, ifr1; |
| 172 | char *newname = NULL; | 172 | char *newname = NULL; |
| 173 | int htype, halen; | 173 | int htype, halen; |
| 174 | static const char keywords[] = | 174 | static const char keywords[] ALIGN1 = |
| 175 | "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0" | 175 | "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0" |
| 176 | "on\0""off\0"; | 176 | "on\0""off\0"; |
| 177 | enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp, | 177 | enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp, |
| @@ -275,7 +275,7 @@ static int ipaddr_list_link(int argc, char **argv) | |||
| 275 | /* Return value becomes exitcode. It's okay to not return at all */ | 275 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 276 | int do_iplink(int argc, char **argv) | 276 | int do_iplink(int argc, char **argv) |
| 277 | { | 277 | { |
| 278 | static const char keywords[] = | 278 | static const char keywords[] ALIGN1 = |
| 279 | "set\0""show\0""lst\0""list\0"; | 279 | "set\0""show\0""lst\0""list\0"; |
| 280 | smalluint key; | 280 | smalluint key; |
| 281 | if (argc <= 0) | 281 | if (argc <= 0) |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 0d171c785..fbc721049 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
| @@ -294,7 +294,7 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, | |||
| 294 | /* Return value becomes exitcode. It's okay to not return at all */ | 294 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 295 | static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) | 295 | static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) |
| 296 | { | 296 | { |
| 297 | static const char keywords[] = | 297 | static const char keywords[] ALIGN1 = |
| 298 | "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0") | 298 | "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0") |
| 299 | "dev\0""oif\0""to\0"; | 299 | "dev\0""oif\0""to\0"; |
| 300 | enum { | 300 | enum { |
| @@ -489,7 +489,7 @@ static int rtnl_rtcache_request(struct rtnl_handle *rth, int family) | |||
| 489 | 489 | ||
| 490 | static void iproute_flush_cache(void) | 490 | static void iproute_flush_cache(void) |
| 491 | { | 491 | { |
| 492 | static const char fn[] = "/proc/sys/net/ipv4/route/flush"; | 492 | static const char fn[] ALIGN1 = "/proc/sys/net/ipv4/route/flush"; |
| 493 | int flush_fd = open_or_warn(fn, O_WRONLY); | 493 | int flush_fd = open_or_warn(fn, O_WRONLY); |
| 494 | 494 | ||
| 495 | if (flush_fd < 0) { | 495 | if (flush_fd < 0) { |
| @@ -517,7 +517,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) | |||
| 517 | struct rtnl_handle rth; | 517 | struct rtnl_handle rth; |
| 518 | char *id = NULL; | 518 | char *id = NULL; |
| 519 | char *od = NULL; | 519 | char *od = NULL; |
| 520 | static const char keywords[] = | 520 | static const char keywords[] ALIGN1 = |
| 521 | "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/ | 521 | "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/ |
| 522 | "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/; | 522 | "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/; |
| 523 | enum { | 523 | enum { |
| @@ -679,7 +679,7 @@ static int iproute_get(int argc, char **argv) | |||
| 679 | char *odev = NULL; | 679 | char *odev = NULL; |
| 680 | bool connected = 0; | 680 | bool connected = 0; |
| 681 | bool from_ok = 0; | 681 | bool from_ok = 0; |
| 682 | static const char options[] = | 682 | static const char options[] ALIGN1 = |
| 683 | "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0"; | 683 | "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0"; |
| 684 | 684 | ||
| 685 | memset(&req, 0, sizeof(req)); | 685 | memset(&req, 0, sizeof(req)); |
| @@ -824,7 +824,7 @@ static int iproute_get(int argc, char **argv) | |||
| 824 | /* Return value becomes exitcode. It's okay to not return at all */ | 824 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 825 | int do_iproute(int argc, char **argv) | 825 | int do_iproute(int argc, char **argv) |
| 826 | { | 826 | { |
| 827 | static const char ip_route_commands[] = | 827 | static const char ip_route_commands[] ALIGN1 = |
| 828 | /*0-3*/ "add\0""append\0""change\0""chg\0" | 828 | /*0-3*/ "add\0""append\0""change\0""chg\0" |
| 829 | /*4-7*/ "delete\0""get\0""list\0""show\0" | 829 | /*4-7*/ "delete\0""get\0""list\0""show\0" |
| 830 | /*8..*/ "prepend\0""replace\0""test\0""flush\0"; | 830 | /*8..*/ "prepend\0""replace\0""test\0""flush\0"; |
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 8e2a06f4f..18ae6b5ef 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
| @@ -187,7 +187,7 @@ static int iprule_list(int argc, char **argv) | |||
| 187 | /* Return value becomes exitcode. It's okay to not return at all */ | 187 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 188 | static int iprule_modify(int cmd, int argc, char **argv) | 188 | static int iprule_modify(int cmd, int argc, char **argv) |
| 189 | { | 189 | { |
| 190 | static const char keywords[] = | 190 | static const char keywords[] ALIGN1 = |
| 191 | "from\0""to\0""preference\0""order\0""priority\0" | 191 | "from\0""to\0""preference\0""order\0""priority\0" |
| 192 | "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" | 192 | "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" |
| 193 | "iif\0""nat\0""map-to\0""type\0""help\0"; | 193 | "iif\0""nat\0""map-to\0""type\0""help\0"; |
| @@ -313,7 +313,7 @@ static int iprule_modify(int cmd, int argc, char **argv) | |||
| 313 | /* Return value becomes exitcode. It's okay to not return at all */ | 313 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 314 | int do_iprule(int argc, char **argv) | 314 | int do_iprule(int argc, char **argv) |
| 315 | { | 315 | { |
| 316 | static const char ip_rule_commands[] = | 316 | static const char ip_rule_commands[] ALIGN1 = |
| 317 | "add\0""delete\0""list\0""show\0"; | 317 | "add\0""delete\0""list\0""show\0"; |
| 318 | int cmd = 2; /* list */ | 318 | int cmd = 2; /* list */ |
| 319 | 319 | ||
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index a2933879c..2b1713556 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
| @@ -128,7 +128,7 @@ static int do_del_ioctl(const char *basedev, struct ip_tunnel_parm *p) | |||
| 128 | /* Dies on error */ | 128 | /* Dies on error */ |
| 129 | static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) | 129 | static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) |
| 130 | { | 130 | { |
| 131 | static const char keywords[] = | 131 | static const char keywords[] ALIGN1 = |
| 132 | "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0" | 132 | "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0" |
| 133 | "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0" | 133 | "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0" |
| 134 | "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0" | 134 | "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0" |
| @@ -519,7 +519,7 @@ static int do_show(int argc, char **argv) | |||
| 519 | /* Return value becomes exitcode. It's okay to not return at all */ | 519 | /* Return value becomes exitcode. It's okay to not return at all */ |
| 520 | int do_iptunnel(int argc, char **argv) | 520 | int do_iptunnel(int argc, char **argv) |
| 521 | { | 521 | { |
| 522 | static const char keywords[] = | 522 | static const char keywords[] ALIGN1 = |
| 523 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; | 523 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; |
| 524 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; | 524 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; |
| 525 | int key; | 525 | int key; |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index e8a8279b0..7b5de92c2 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
| @@ -131,7 +131,7 @@ unsigned ll_index_to_flags(int idx) | |||
| 131 | return 0; | 131 | return 0; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | int xll_name_to_index(const char * const name) | 134 | int xll_name_to_index(const char *const name) |
| 135 | { | 135 | { |
| 136 | int ret = 0; | 136 | int ret = 0; |
| 137 | int sock_fd; | 137 | int sock_fd; |
diff --git a/networking/libiproute/ll_map.h b/networking/libiproute/ll_map.h index 2dfc84422..55e2cf393 100644 --- a/networking/libiproute/ll_map.h +++ b/networking/libiproute/ll_map.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 5 | int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
| 6 | int ll_init_map(struct rtnl_handle *rth); | 6 | int ll_init_map(struct rtnl_handle *rth); |
| 7 | int xll_name_to_index(const char * const name); | 7 | int xll_name_to_index(const char *const name); |
| 8 | const char *ll_index_to_name(int idx); | 8 | const char *ll_index_to_name(int idx); |
| 9 | const char *ll_idx_n2a(int idx, char *buf); | 9 | const char *ll_idx_n2a(int idx, char *buf); |
| 10 | /* int ll_index_to_type(int idx); */ | 10 | /* int ll_index_to_type(int idx); */ |
diff --git a/networking/libiproute/rtm_map.c b/networking/libiproute/rtm_map.c index 96b2d1791..ca2f4436a 100644 --- a/networking/libiproute/rtm_map.c +++ b/networking/libiproute/rtm_map.c | |||
| @@ -51,7 +51,7 @@ const char *rtnl_rtntype_n2a(int id, char *buf, int len) | |||
| 51 | 51 | ||
| 52 | int rtnl_rtntype_a2n(int *id, char *arg) | 52 | int rtnl_rtntype_a2n(int *id, char *arg) |
| 53 | { | 53 | { |
| 54 | static const char keywords[] = | 54 | static const char keywords[] ALIGN1 = |
| 55 | "local\0""nat\0""broadcast\0""brd\0""anycast\0" | 55 | "local\0""nat\0""broadcast\0""brd\0""anycast\0" |
| 56 | "multicast\0""prohibit\0""unreachable\0""blackhole\0" | 56 | "multicast\0""prohibit\0""unreachable\0""blackhole\0" |
| 57 | "xresolve\0""unicast\0""throw\0"; | 57 | "xresolve\0""unicast\0""throw\0"; |
diff --git a/networking/netstat.c b/networking/netstat.c index 746e25091..014e5e251 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
| @@ -47,8 +47,7 @@ enum { | |||
| 47 | TCP_CLOSING /* now a valid state */ | 47 | TCP_CLOSING /* now a valid state */ |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | static const char * const tcp_state[] = | 50 | static const char *const tcp_state[] = { |
| 51 | { | ||
| 52 | "", | 51 | "", |
| 53 | "ESTABLISHED", | 52 | "ESTABLISHED", |
| 54 | "SYN_SENT", | 53 | "SYN_SENT", |
diff --git a/networking/route.c b/networking/route.c index 530c51b10..bfa58da2a 100644 --- a/networking/route.c +++ b/networking/route.c | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | #define HOST_FLAG 2 | 73 | #define HOST_FLAG 2 |
| 74 | 74 | ||
| 75 | /* We remap '-' to '#' to avoid problems with getopt. */ | 75 | /* We remap '-' to '#' to avoid problems with getopt. */ |
| 76 | static const char tbl_hash_net_host[] = | 76 | static const char tbl_hash_net_host[] ALIGN1 = |
| 77 | "\007\001#net\0" | 77 | "\007\001#net\0" |
| 78 | /* "\010\002#host\0" */ | 78 | /* "\010\002#host\0" */ |
| 79 | "\007\002#host" /* Since last, we can save a byte. */ | 79 | "\007\002#host" /* Since last, we can save a byte. */ |
| @@ -96,7 +96,7 @@ static const char tbl_hash_net_host[] = | |||
| 96 | #define KW_IPVx_DYN 042 | 96 | #define KW_IPVx_DYN 042 |
| 97 | #define KW_IPVx_REINSTATE 043 | 97 | #define KW_IPVx_REINSTATE 043 |
| 98 | 98 | ||
| 99 | static const char tbl_ipvx[] = | 99 | static const char tbl_ipvx[] ALIGN1 = |
| 100 | /* 020 is the "takes an arg" bit */ | 100 | /* 020 is the "takes an arg" bit */ |
| 101 | #if HAVE_NEW_ADDRT | 101 | #if HAVE_NEW_ADDRT |
| 102 | "\011\020metric\0" | 102 | "\011\020metric\0" |
| @@ -438,7 +438,7 @@ static void INET6_setroute(int action, char **args) | |||
| 438 | } | 438 | } |
| 439 | #endif | 439 | #endif |
| 440 | 440 | ||
| 441 | static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */ | 441 | static const unsigned flagvals[] = { /* Must agree with flagchars[]. */ |
| 442 | RTF_GATEWAY, | 442 | RTF_GATEWAY, |
| 443 | RTF_HOST, | 443 | RTF_HOST, |
| 444 | RTF_REINSTATE, | 444 | RTF_REINSTATE, |
| @@ -454,7 +454,8 @@ static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */ | |||
| 454 | #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED) | 454 | #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED) |
| 455 | #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE) | 455 | #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE) |
| 456 | 456 | ||
| 457 | static const char flagchars[] = /* Must agree with flagvals[]. */ | 457 | /* Must agree with flagvals[]. */ |
| 458 | static const char flagchars[] ALIGN1 = | ||
| 458 | "GHRDM" | 459 | "GHRDM" |
| 459 | #if ENABLE_FEATURE_IPV6 | 460 | #if ENABLE_FEATURE_IPV6 |
| 460 | "DAC" | 461 | "DAC" |
| @@ -631,11 +632,12 @@ static void INET6_displayroutes(int noresolve) | |||
| 631 | #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */ | 632 | #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */ |
| 632 | 633 | ||
| 633 | /* 1st byte is offset to next entry offset. 2nd byte is return value. */ | 634 | /* 1st byte is offset to next entry offset. 2nd byte is return value. */ |
| 634 | static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */ | 635 | /* 2nd byte matches RTACTION_* code */ |
| 636 | static const char tbl_verb[] ALIGN1 = | ||
| 635 | "\006\001add\0" | 637 | "\006\001add\0" |
| 636 | "\006\002del\0" | 638 | "\006\002del\0" |
| 637 | /* "\011\002delete\0" */ | 639 | /* "\011\002delete\0" */ |
| 638 | "\010\002delete" /* Since last, we can save a byte. */ | 640 | "\010\002delete" /* Since it's last, we can save a byte. */ |
| 639 | ; | 641 | ; |
| 640 | 642 | ||
| 641 | int route_main(int argc, char **argv); | 643 | int route_main(int argc, char **argv); |
diff --git a/networking/slattach.c b/networking/slattach.c index 4bac879d2..f78c88e89 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
| @@ -123,7 +123,7 @@ int slattach_main(int argc, char **argv); | |||
| 123 | int slattach_main(int argc, char **argv) | 123 | int slattach_main(int argc, char **argv) |
| 124 | { | 124 | { |
| 125 | /* Line discipline code table */ | 125 | /* Line discipline code table */ |
| 126 | static const char proto_names[] = | 126 | static const char proto_names[] ALIGN1 = |
| 127 | "slip\0" /* 0 */ | 127 | "slip\0" /* 0 */ |
| 128 | "cslip\0" /* 1 */ | 128 | "cslip\0" /* 1 */ |
| 129 | "slip6\0" /* 2 */ | 129 | "slip6\0" /* 2 */ |
diff --git a/networking/telnet.c b/networking/telnet.c index a634d7a2b..4e8b27ba6 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
| @@ -353,7 +353,7 @@ static void putiac_naws(byte c, int x, int y) | |||
| 353 | } | 353 | } |
| 354 | #endif | 354 | #endif |
| 355 | 355 | ||
| 356 | static char const escapecharis[] = "\r\nEscape character is "; | 356 | static char const escapecharis[] ALIGN1 = "\r\nEscape character is "; |
| 357 | 357 | ||
| 358 | static void setConMode(void) | 358 | static void setConMode(void) |
| 359 | { | 359 | { |
diff --git a/networking/tftp.c b/networking/tftp.c index b20486cc1..85d1a857f 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
| @@ -278,7 +278,7 @@ static int tftp( USE_GETPUT(const int cmd,) | |||
| 278 | "unknown transfer id", | 278 | "unknown transfer id", |
| 279 | "file already exists", | 279 | "file already exists", |
| 280 | "no such user", | 280 | "no such user", |
| 281 | "bad option", | 281 | "bad option" |
| 282 | }; | 282 | }; |
| 283 | 283 | ||
| 284 | const char *msg = ""; | 284 | const char *msg = ""; |
| @@ -309,7 +309,7 @@ static int tftp( USE_GETPUT(const int cmd,) | |||
| 309 | /* htons can be impossible to use in const initializer: */ | 309 | /* htons can be impossible to use in const initializer: */ |
| 310 | /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/ | 310 | /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/ |
| 311 | /* thus we open-code big-endian layout */ | 311 | /* thus we open-code big-endian layout */ |
| 312 | static const char error_8[4] = { 0,TFTP_ERROR, 0,8 }; | 312 | static const uint8_t error_8[4] = { 0,TFTP_ERROR, 0,8 }; |
| 313 | xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len); | 313 | xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len); |
| 314 | bb_error_msg("server proposes bad blksize %d, exiting", blksize); | 314 | bb_error_msg("server proposes bad blksize %d, exiting", blksize); |
| 315 | goto ret; | 315 | goto ret; |
diff --git a/networking/traceroute.c b/networking/traceroute.c index c87f7ffc5..20f304d53 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
| @@ -700,7 +700,7 @@ send_probe(int seq, int ttl) | |||
| 700 | static inline const char * | 700 | static inline const char * |
| 701 | pr_type(unsigned char t) | 701 | pr_type(unsigned char t) |
| 702 | { | 702 | { |
| 703 | static const char * const ttab[] = { | 703 | static const char *const ttab[] = { |
| 704 | "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", | 704 | "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable", |
| 705 | "Source Quench", "Redirect", "ICMP 6", "ICMP 7", | 705 | "Source Quench", "Redirect", "ICMP 6", "ICMP 7", |
| 706 | "Echo", "Router Advert", "Router Solicit", "Time Exceeded", | 706 | "Echo", "Router Advert", "Router Solicit", "Time Exceeded", |
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 59c015575..a47bbafff 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
| @@ -6,4 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include "common.h" | 7 | #include "common.h" |
| 8 | 8 | ||
| 9 | const uint8_t MAC_BCAST_ADDR[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 9 | const uint8_t MAC_BCAST_ADDR[6] ALIGN2 = { |
| 10 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff | ||
| 11 | }; | ||
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index efe208814..0e89c3cae 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
| @@ -180,7 +180,7 @@ int udhcpc_main(int argc, char **argv) | |||
| 180 | OPT_v = 1 << 17, | 180 | OPT_v = 1 << 17, |
| 181 | }; | 181 | }; |
| 182 | #if ENABLE_GETOPT_LONG | 182 | #if ENABLE_GETOPT_LONG |
| 183 | static const char udhcpc_longopts[] = | 183 | static const char udhcpc_longopts[] ALIGN1 = |
| 184 | "clientid\0" Required_argument "c" | 184 | "clientid\0" Required_argument "c" |
| 185 | "clientid-none\0" No_argument "C" | 185 | "clientid-none\0" No_argument "C" |
| 186 | "vendorclass\0" Required_argument "V" | 186 | "vendorclass\0" Required_argument "V" |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index f9f923124..a0765be79 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
| @@ -24,7 +24,7 @@ int dumpleases_main(int argc, char **argv) | |||
| 24 | OPT_f = 0x4, // -f | 24 | OPT_f = 0x4, // -f |
| 25 | }; | 25 | }; |
| 26 | #if ENABLE_GETOPT_LONG | 26 | #if ENABLE_GETOPT_LONG |
| 27 | static const char dumpleases_longopts[] = | 27 | static const char dumpleases_longopts[] ALIGN1 = |
| 28 | "absolute\0" No_argument "a" | 28 | "absolute\0" No_argument "a" |
| 29 | "remaining\0" No_argument "r" | 29 | "remaining\0" No_argument "r" |
| 30 | "file\0" Required_argument "f" | 30 | "file\0" Required_argument "f" |
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index a58adb9a9..3168fc69a 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c | |||
| @@ -52,7 +52,7 @@ const struct dhcp_option dhcp_options[] = { | |||
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | /* Lengths of the different option types */ | 54 | /* Lengths of the different option types */ |
| 55 | const unsigned char option_lengths[] = { | 55 | const unsigned char option_lengths[] ALIGN1 = { |
| 56 | [OPTION_IP] = 4, | 56 | [OPTION_IP] = 4, |
| 57 | [OPTION_IP_PAIR] = 8, | 57 | [OPTION_IP_PAIR] = 8, |
| 58 | [OPTION_BOOLEAN] = 1, | 58 | [OPTION_BOOLEAN] = 1, |
diff --git a/networking/vconfig.c b/networking/vconfig.c index 4776e1324..8bd88701f 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
| @@ -63,7 +63,7 @@ static const char *xfind_str(const char *table, const char *str) | |||
| 63 | return table - 1; | 63 | return table - 1; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | static const char cmds[] = { | 66 | static const char cmds[] ALIGN1 = { |
| 67 | 4, ADD_VLAN_CMD, 7, | 67 | 4, ADD_VLAN_CMD, 7, |
| 68 | 'a', 'd', 'd', 0, | 68 | 'a', 'd', 'd', 0, |
| 69 | 3, DEL_VLAN_CMD, 7, | 69 | 3, DEL_VLAN_CMD, 7, |
| @@ -85,7 +85,7 @@ static const char cmds[] = { | |||
| 85 | 'm', 'a', 'p', 0, | 85 | 'm', 'a', 'p', 0, |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | static const char name_types[] = { | 88 | static const char name_types[] ALIGN1 = { |
| 89 | VLAN_NAME_TYPE_PLUS_VID, 16, | 89 | VLAN_NAME_TYPE_PLUS_VID, 16, |
| 90 | 'V', 'L', 'A', 'N', | 90 | 'V', 'L', 'A', 'N', |
| 91 | '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D', | 91 | '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D', |
| @@ -104,7 +104,7 @@ static const char name_types[] = { | |||
| 104 | '_', 'N', 'O', '_', 'P', 'A', 'D', 0, | 104 | '_', 'N', 'O', '_', 'P', 'A', 'D', 0, |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | static const char conf_file_name[] = "/proc/net/vlan/config"; | 107 | static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config"; |
| 108 | 108 | ||
| 109 | int vconfig_main(int argc, char **argv); | 109 | int vconfig_main(int argc, char **argv); |
| 110 | int vconfig_main(int argc, char **argv) | 110 | int vconfig_main(int argc, char **argv) |
diff --git a/networking/wget.c b/networking/wget.c index 7b583c7ab..d90368c40 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
| @@ -114,7 +114,7 @@ int wget_main(int argc, char **argv) | |||
| 114 | bool use_proxy = 1; /* Use proxies if env vars are set */ | 114 | bool use_proxy = 1; /* Use proxies if env vars are set */ |
| 115 | const char *proxy_flag = "on"; /* Use proxies if env vars are set */ | 115 | const char *proxy_flag = "on"; /* Use proxies if env vars are set */ |
| 116 | const char *user_agent = "Wget";/* "User-Agent" header field */ | 116 | const char *user_agent = "Wget";/* "User-Agent" header field */ |
| 117 | static const char keywords[] = | 117 | static const char keywords[] ALIGN1 = |
| 118 | "content-length\0""transfer-encoding\0""chunked\0""location\0"; | 118 | "content-length\0""transfer-encoding\0""chunked\0""location\0"; |
| 119 | enum { | 119 | enum { |
| 120 | KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location | 120 | KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location |
| @@ -131,7 +131,7 @@ int wget_main(int argc, char **argv) | |||
| 131 | WGET_OPT_HEADER = 0x100, | 131 | WGET_OPT_HEADER = 0x100, |
| 132 | }; | 132 | }; |
| 133 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 133 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
| 134 | static const char wget_longopts[] = | 134 | static const char wget_longopts[] ALIGN1 = |
| 135 | /* name, has_arg, val */ | 135 | /* name, has_arg, val */ |
| 136 | "continue\0" No_argument "c" | 136 | "continue\0" No_argument "c" |
| 137 | "spider\0" No_argument "s" | 137 | "spider\0" No_argument "s" |
| @@ -539,7 +539,7 @@ static void parse_url(char *src_url, struct host_info *h) | |||
| 539 | p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p; | 539 | p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p; |
| 540 | if (!sp) { | 540 | if (!sp) { |
| 541 | /* must be writable because of bb_get_last_path_component() */ | 541 | /* must be writable because of bb_get_last_path_component() */ |
| 542 | static char nullstr[] = ""; | 542 | static char nullstr[] ALIGN1 = ""; |
| 543 | h->path = nullstr; | 543 | h->path = nullstr; |
| 544 | } else if (*sp == '/') { | 544 | } else if (*sp == '/') { |
| 545 | *sp = '\0'; | 545 | *sp = '\0'; |
