diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arping.c | 7 | ||||
-rw-r--r-- | networking/ftpgetput.c | 5 | ||||
-rw-r--r-- | networking/ifenslave.c | 2 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/slattach.c | 2 | ||||
-rw-r--r-- | networking/tcpudp.c | 9 | ||||
-rw-r--r-- | networking/tftp.c | 4 | ||||
-rw-r--r-- | networking/udhcp/clientpacket.c | 2 |
8 files changed, 14 insertions, 19 deletions
diff --git a/networking/arping.c b/networking/arping.c index 2db2ff412..0a444f15c 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -61,10 +61,9 @@ struct globals { | |||
61 | #define received (G.received ) | 61 | #define received (G.received ) |
62 | #define brd_recv (G.brd_recv ) | 62 | #define brd_recv (G.brd_recv ) |
63 | #define req_recv (G.req_recv ) | 63 | #define req_recv (G.req_recv ) |
64 | #define INIT_G() \ | 64 | #define INIT_G() do { \ |
65 | do { \ | 65 | count = -1; \ |
66 | count = -1; \ | 66 | } while (0) |
67 | } while (0) | ||
68 | 67 | ||
69 | // If GNUisms are not available... | 68 | // If GNUisms are not available... |
70 | //static void *mempcpy(void *_dst, const void *_src, int n) | 69 | //static void *mempcpy(void *_dst, const void *_src, int n) |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index be3d5a673..f732d02a4 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -27,7 +27,7 @@ struct globals { | |||
27 | #define G (*(struct globals*)&bb_common_bufsiz1) | 27 | #define G (*(struct globals*)&bb_common_bufsiz1) |
28 | enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; | 28 | enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; |
29 | struct BUG_G_too_big { | 29 | struct BUG_G_too_big { |
30 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; | 30 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; |
31 | }; | 31 | }; |
32 | #define user (G.user ) | 32 | #define user (G.user ) |
33 | #define password (G.password ) | 33 | #define password (G.password ) |
@@ -36,8 +36,7 @@ struct BUG_G_too_big { | |||
36 | #define verbose_flag (G.verbose_flag ) | 36 | #define verbose_flag (G.verbose_flag ) |
37 | #define do_continue (G.do_continue ) | 37 | #define do_continue (G.do_continue ) |
38 | #define buf (G.buf ) | 38 | #define buf (G.buf ) |
39 | #define INIT_G() do { \ | 39 | #define INIT_G() do { } while (0) |
40 | } while (0) | ||
41 | 40 | ||
42 | 41 | ||
43 | static void ftp_die(const char *msg) ATTRIBUTE_NORETURN; | 42 | static void ftp_die(const char *msg) ATTRIBUTE_NORETURN; |
diff --git a/networking/ifenslave.c b/networking/ifenslave.c index fed186967..4c7eadc83 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c | |||
@@ -147,7 +147,7 @@ static int ioctl_on_skfd(unsigned request, struct ifreq *ifr) | |||
147 | 147 | ||
148 | static int set_ifrname_and_do_ioctl(unsigned request, struct ifreq *ifr, const char *ifname) | 148 | static int set_ifrname_and_do_ioctl(unsigned request, struct ifreq *ifr, const char *ifname) |
149 | { | 149 | { |
150 | strncpy_IFNAMSIZ(ifr->ifr_name, ifname); | 150 | strncpy_IFNAMSIZ(ifr->ifr_name, ifname); |
151 | return ioctl_on_skfd(request, ifr); | 151 | return ioctl_on_skfd(request, ifr); |
152 | } | 152 | } |
153 | 153 | ||
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 6977a0956..354442c4e 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -582,7 +582,7 @@ static int iproute_list_or_flush(char **argv, int flush) | |||
582 | if (rtnl_rttable_a2n(&tid, *argv)) | 582 | if (rtnl_rttable_a2n(&tid, *argv)) |
583 | invarg(*argv, "table"); | 583 | invarg(*argv, "table"); |
584 | filter.tb = tid; | 584 | filter.tb = tid; |
585 | #else | 585 | #else |
586 | invarg(*argv, "table"); | 586 | invarg(*argv, "table"); |
587 | #endif | 587 | #endif |
588 | } | 588 | } |
diff --git a/networking/slattach.c b/networking/slattach.c index 96dec7e5f..02ecb5e9f 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
@@ -25,7 +25,7 @@ struct globals { | |||
25 | #define handle (G.handle ) | 25 | #define handle (G.handle ) |
26 | #define saved_disc (G.saved_disc ) | 26 | #define saved_disc (G.saved_disc ) |
27 | #define saved_state (G.saved_state ) | 27 | #define saved_state (G.saved_state ) |
28 | #define INIT_G() do {} while (0) | 28 | #define INIT_G() do { } while (0) |
29 | 29 | ||
30 | 30 | ||
31 | /* | 31 | /* |
diff --git a/networking/tcpudp.c b/networking/tcpudp.c index 07a87b8ed..561d1324c 100644 --- a/networking/tcpudp.c +++ b/networking/tcpudp.c | |||
@@ -59,11 +59,10 @@ struct globals { | |||
59 | #define cmax (G.cmax ) | 59 | #define cmax (G.cmax ) |
60 | #define env_cur (G.env_cur ) | 60 | #define env_cur (G.env_cur ) |
61 | #define env_var (G.env_var ) | 61 | #define env_var (G.env_var ) |
62 | #define INIT_G() \ | 62 | #define INIT_G() do { \ |
63 | do { \ | 63 | cmax = 30; \ |
64 | cmax = 30; \ | 64 | env_cur = &env_var[0]; \ |
65 | env_cur = &env_var[0]; \ | 65 | } while (0) |
66 | } while (0) | ||
67 | 66 | ||
68 | 67 | ||
69 | /* We have to be careful about leaking memory in repeated setenv's */ | 68 | /* We have to be careful about leaking memory in repeated setenv's */ |
diff --git a/networking/tftp.c b/networking/tftp.c index 63e045dfb..c61cde9d5 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -92,9 +92,7 @@ struct globals { | |||
92 | #define block_buf (G.block_buf ) | 92 | #define block_buf (G.block_buf ) |
93 | #define user_opt (G.user_opt ) | 93 | #define user_opt (G.user_opt ) |
94 | #define error_pkt (G.error_pkt ) | 94 | #define error_pkt (G.error_pkt ) |
95 | #define INIT_G() \ | 95 | #define INIT_G() do { } while (0) |
96 | do { \ | ||
97 | } while (0) | ||
98 | 96 | ||
99 | #define error_pkt_reason (error_pkt[3]) | 97 | #define error_pkt_reason (error_pkt[3]) |
100 | #define error_pkt_str (error_pkt + 4) | 98 | #define error_pkt_str (error_pkt + 4) |
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index c562c1200..3e4561946 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c | |||
@@ -64,7 +64,7 @@ static void add_param_req_option(struct dhcpMessage *packet) | |||
64 | 64 | ||
65 | for (i = 0; (c = dhcp_options[i].code) != 0; i++) { | 65 | for (i = 0; (c = dhcp_options[i].code) != 0; i++) { |
66 | if (((dhcp_options[i].flags & OPTION_REQ) | 66 | if (((dhcp_options[i].flags & OPTION_REQ) |
67 | && !client_config.no_default_options) | 67 | && !client_config.no_default_options) |
68 | || (client_config.opt_mask[c >> 3] & (1 << (c & 7))) | 68 | || (client_config.opt_mask[c >> 3] & (1 << (c & 7))) |
69 | ) { | 69 | ) { |
70 | packet->options[end + OPT_DATA + len] = c; | 70 | packet->options[end + OPT_DATA + len] = c; |