diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arping.c | 2 | ||||
-rw-r--r-- | networking/httpd.c | 2 | ||||
-rw-r--r-- | networking/ifenslave.c | 2 | ||||
-rw-r--r-- | networking/ifupdown.c | 6 | ||||
-rw-r--r-- | networking/inetd.c | 4 | ||||
-rw-r--r-- | networking/interface.c | 4 | ||||
-rw-r--r-- | networking/isrv_identd.c | 2 | ||||
-rw-r--r-- | networking/libiproute/libnetlink.c | 8 | ||||
-rw-r--r-- | networking/libiproute/ll_map.c | 2 | ||||
-rw-r--r-- | networking/libiproute/ll_proto.c | 6 | ||||
-rw-r--r-- | networking/libiproute/ll_types.c | 2 | ||||
-rw-r--r-- | networking/sendmail.c | 4 | ||||
-rw-r--r-- | networking/traceroute.c | 2 | ||||
-rw-r--r-- | networking/udhcp/files.c | 4 | ||||
-rw-r--r-- | networking/zcip.c | 2 |
15 files changed, 25 insertions, 27 deletions
diff --git a/networking/arping.c b/networking/arping.c index 9d2c671bc..2db2ff412 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -174,7 +174,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) | |||
174 | if (ah->ar_pro != htons(ETH_P_IP) | 174 | if (ah->ar_pro != htons(ETH_P_IP) |
175 | || (ah->ar_pln != 4) | 175 | || (ah->ar_pln != 4) |
176 | || (ah->ar_hln != me.sll_halen) | 176 | || (ah->ar_hln != me.sll_halen) |
177 | || (len < sizeof(*ah) + 2 * (4 + ah->ar_hln))) | 177 | || (len < (int)(sizeof(*ah) + 2 * (4 + ah->ar_hln)))) |
178 | return false; | 178 | return false; |
179 | 179 | ||
180 | memcpy(&src_ip, p + ah->ar_hln, 4); | 180 | memcpy(&src_ip, p + ah->ar_hln, 4); |
diff --git a/networking/httpd.c b/networking/httpd.c index 6fd322cb8..f835d80ca 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -600,7 +600,7 @@ static void parse_conf(const char *path, int flag) | |||
600 | 600 | ||
601 | #if ENABLE_FEATURE_HTTPD_ERROR_PAGES | 601 | #if ENABLE_FEATURE_HTTPD_ERROR_PAGES |
602 | if (flag == FIRST_PARSE && *p0 == 'E') { | 602 | if (flag == FIRST_PARSE && *p0 == 'E') { |
603 | int i; | 603 | unsigned i; |
604 | /* error status code */ | 604 | /* error status code */ |
605 | int status = atoi(++p0); | 605 | int status = atoi(++p0); |
606 | /* c already points at the character following ':' in parse loop */ | 606 | /* c already points at the character following ':' in parse loop */ |
diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 0aa232028..983d9d096 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c | |||
@@ -604,7 +604,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname) | |||
604 | 604 | ||
605 | struct ifreq ifr; | 605 | struct ifreq ifr; |
606 | int res; | 606 | int res; |
607 | int i; | 607 | unsigned i; |
608 | 608 | ||
609 | for (i = 0; i < ARRAY_SIZE(ifra); i++) { | 609 | for (i = 0; i < ARRAY_SIZE(ifra); i++) { |
610 | strncpy_IFNAMSIZ(ifr.ifr_name, master_ifname); | 610 | strncpy_IFNAMSIZ(ifr.ifr_name, master_ifname); |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 50b96261b..c12391863 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -486,7 +486,7 @@ static const struct dhcp_client_t ext_dhcp_clients[] = { | |||
486 | #if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP | 486 | #if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP |
487 | static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) | 487 | static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) |
488 | { | 488 | { |
489 | int i; | 489 | unsigned i; |
490 | #if ENABLE_FEATURE_IFUPDOWN_IP | 490 | #if ENABLE_FEATURE_IFUPDOWN_IP |
491 | /* ip doesn't up iface when it configures it (unlike ifconfig) */ | 491 | /* ip doesn't up iface when it configures it (unlike ifconfig) */ |
492 | if (!execute("ip link set %iface% up", ifd, exec)) | 492 | if (!execute("ip link set %iface% up", ifd, exec)) |
@@ -522,7 +522,7 @@ static int dhcp_up(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, | |||
522 | #if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP | 522 | #if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP |
523 | static int dhcp_down(struct interface_defn_t *ifd, execfn *exec) | 523 | static int dhcp_down(struct interface_defn_t *ifd, execfn *exec) |
524 | { | 524 | { |
525 | int i; | 525 | unsigned i; |
526 | for (i = 0; i < ARRAY_SIZE(ext_dhcp_clients); i++) { | 526 | for (i = 0; i < ARRAY_SIZE(ext_dhcp_clients); i++) { |
527 | if (exists_execable(ext_dhcp_clients[i].name)) | 527 | if (exists_execable(ext_dhcp_clients[i].name)) |
528 | return execute(ext_dhcp_clients[i].stopcmd, ifd, exec); | 528 | return execute(ext_dhcp_clients[i].stopcmd, ifd, exec); |
@@ -1154,7 +1154,7 @@ int ifupdown_main(int argc, char **argv) | |||
1154 | char *liface; | 1154 | char *liface; |
1155 | char *pch; | 1155 | char *pch; |
1156 | bool okay = 0; | 1156 | bool okay = 0; |
1157 | unsigned cmds_ret; | 1157 | int cmds_ret; |
1158 | 1158 | ||
1159 | iface = xstrdup(target_list->data); | 1159 | iface = xstrdup(target_list->data); |
1160 | target_list = target_list->link; | 1160 | target_list = target_list->link; |
diff --git a/networking/inetd.c b/networking/inetd.c index d71a1159c..3be9dcb7f 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -750,7 +750,7 @@ static NOINLINE servtab_t *parse_one_line(void) | |||
750 | if (*p == '-') { | 750 | if (*p == '-') { |
751 | p++; | 751 | p++; |
752 | n = bb_strtou(p, &p, 10); | 752 | n = bb_strtou(p, &p, 10); |
753 | if (n > INT_MAX || n < sep->se_rpcver_lo) | 753 | if (n > INT_MAX || (int)n < sep->se_rpcver_lo) |
754 | goto bad_ver_spec; | 754 | goto bad_ver_spec; |
755 | sep->se_rpcver_hi = n; | 755 | sep->se_rpcver_hi = n; |
756 | } | 756 | } |
@@ -812,7 +812,7 @@ static NOINLINE servtab_t *parse_one_line(void) | |||
812 | && (sep->se_socktype == SOCK_STREAM | 812 | && (sep->se_socktype == SOCK_STREAM |
813 | || sep->se_socktype == SOCK_DGRAM) | 813 | || sep->se_socktype == SOCK_DGRAM) |
814 | ) { | 814 | ) { |
815 | int i; | 815 | unsigned i; |
816 | for (i = 0; i < ARRAY_SIZE(builtins); i++) | 816 | for (i = 0; i < ARRAY_SIZE(builtins); i++) |
817 | if (strncmp(builtins[i].bi_service7, sep->se_service, 7) == 0) | 817 | if (strncmp(builtins[i].bi_service7, sep->se_service, 7) == 0) |
818 | goto found_bi; | 818 | goto found_bi; |
diff --git a/networking/interface.c b/networking/interface.c index ee8ab102e..a24ab01fe 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -525,7 +525,7 @@ static int if_readconf(void) | |||
525 | if (ioctl_or_warn(skfd, SIOCGIFCONF, &ifc) < 0) { | 525 | if (ioctl_or_warn(skfd, SIOCGIFCONF, &ifc) < 0) { |
526 | goto out; | 526 | goto out; |
527 | } | 527 | } |
528 | if (ifc.ifc_len == sizeof(struct ifreq) * numreqs) { | 528 | if (ifc.ifc_len == (int)(sizeof(struct ifreq) * numreqs)) { |
529 | /* assume it overflowed and try again */ | 529 | /* assume it overflowed and try again */ |
530 | numreqs += 10; | 530 | numreqs += 10; |
531 | continue; | 531 | continue; |
@@ -862,7 +862,7 @@ const struct hwtype *get_hwntype(int type) | |||
862 | /* return 1 if address is all zeros */ | 862 | /* return 1 if address is all zeros */ |
863 | static int hw_null_address(const struct hwtype *hw, void *ap) | 863 | static int hw_null_address(const struct hwtype *hw, void *ap) |
864 | { | 864 | { |
865 | unsigned int i; | 865 | int i; |
866 | unsigned char *address = (unsigned char *) ap; | 866 | unsigned char *address = (unsigned char *) ap; |
867 | 867 | ||
868 | for (i = 0; i < hw->alen; i++) | 868 | for (i = 0; i < hw->alen; i++) |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index a96ac6041..3e0563298 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
@@ -61,7 +61,7 @@ static int do_rd(int fd, void **paramp) | |||
61 | p = strpbrk(cur, "\r\n"); | 61 | p = strpbrk(cur, "\r\n"); |
62 | if (p) | 62 | if (p) |
63 | *p = '\0'; | 63 | *p = '\0'; |
64 | if (!p && sz && buf->pos <= sizeof(buf->buf)) | 64 | if (!p && sz && buf->pos <= (int)sizeof(buf->buf)) |
65 | goto ok; | 65 | goto ok; |
66 | /* Terminate session. If we are in server mode, then | 66 | /* Terminate session. If we are in server mode, then |
67 | * fd is still in nonblocking mode - we never block here */ | 67 | * fd is still in nonblocking mode - we never block here */ |
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index d29d035d0..47a055ac0 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c | |||
@@ -265,7 +265,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, | |||
265 | if (msg.msg_namelen != sizeof(nladdr)) { | 265 | if (msg.msg_namelen != sizeof(nladdr)) { |
266 | bb_error_msg_and_die("sender address length == %d", msg.msg_namelen); | 266 | bb_error_msg_and_die("sender address length == %d", msg.msg_namelen); |
267 | } | 267 | } |
268 | for (h = (struct nlmsghdr*)buf; status >= sizeof(*h); ) { | 268 | for (h = (struct nlmsghdr*)buf; status >= (int)sizeof(*h); ) { |
269 | // int l_err; | 269 | // int l_err; |
270 | int len = h->nlmsg_len; | 270 | int len = h->nlmsg_len; |
271 | int l = len - sizeof(*h); | 271 | int l = len - sizeof(*h); |
@@ -293,7 +293,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, | |||
293 | 293 | ||
294 | if (h->nlmsg_type == NLMSG_ERROR) { | 294 | if (h->nlmsg_type == NLMSG_ERROR) { |
295 | struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); | 295 | struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); |
296 | if (l < sizeof(struct nlmsgerr)) { | 296 | if (l < (int)sizeof(struct nlmsgerr)) { |
297 | bb_error_msg("ERROR truncated"); | 297 | bb_error_msg("ERROR truncated"); |
298 | } else { | 298 | } else { |
299 | errno = - err->error; | 299 | errno = - err->error; |
@@ -336,7 +336,7 @@ int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) | |||
336 | { | 336 | { |
337 | int len = RTA_LENGTH(4); | 337 | int len = RTA_LENGTH(4); |
338 | struct rtattr *rta; | 338 | struct rtattr *rta; |
339 | if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) | 339 | if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) |
340 | return -1; | 340 | return -1; |
341 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); | 341 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); |
342 | rta->rta_type = type; | 342 | rta->rta_type = type; |
@@ -351,7 +351,7 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) | |||
351 | int len = RTA_LENGTH(alen); | 351 | int len = RTA_LENGTH(alen); |
352 | struct rtattr *rta; | 352 | struct rtattr *rta; |
353 | 353 | ||
354 | if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) | 354 | if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) |
355 | return -1; | 355 | return -1; |
356 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); | 356 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); |
357 | rta->rta_type = type; | 357 | rta->rta_type = type; |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index 3cfc9ccec..031b29a60 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -75,7 +75,7 @@ int ll_remember_index(struct sockaddr_nl *who ATTRIBUTE_UNUSED, | |||
75 | if (tb[IFLA_ADDRESS]) { | 75 | if (tb[IFLA_ADDRESS]) { |
76 | int alen; | 76 | int alen; |
77 | im->alen = alen = RTA_PAYLOAD(tb[IFLA_ADDRESS]); | 77 | im->alen = alen = RTA_PAYLOAD(tb[IFLA_ADDRESS]); |
78 | if (alen > sizeof(im->addr)) | 78 | if (alen > (int)sizeof(im->addr)) |
79 | alen = sizeof(im->addr); | 79 | alen = sizeof(im->addr); |
80 | memcpy(im->addr, RTA_DATA(tb[IFLA_ADDRESS]), alen); | 80 | memcpy(im->addr, RTA_DATA(tb[IFLA_ADDRESS]), alen); |
81 | } else { | 81 | } else { |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 62262c9c2..8d9637408 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
@@ -98,10 +98,8 @@ __PF(ECONET,econet) | |||
98 | 98 | ||
99 | const char *ll_proto_n2a(unsigned short id, char *buf, int len) | 99 | const char *ll_proto_n2a(unsigned short id, char *buf, int len) |
100 | { | 100 | { |
101 | int i; | 101 | unsigned i; |
102 | |||
103 | id = ntohs(id); | 102 | id = ntohs(id); |
104 | |||
105 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { | 103 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { |
106 | if (llproto_names[i].id == id) | 104 | if (llproto_names[i].id == id) |
107 | return llproto_names[i].name; | 105 | return llproto_names[i].name; |
@@ -112,7 +110,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len) | |||
112 | 110 | ||
113 | int ll_proto_a2n(unsigned short *id, char *buf) | 111 | int ll_proto_a2n(unsigned short *id, char *buf) |
114 | { | 112 | { |
115 | int i; | 113 | unsigned i; |
116 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { | 114 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { |
117 | if (strcasecmp(llproto_names[i].name, buf) == 0) { | 115 | if (strcasecmp(llproto_names[i].name, buf) == 0) { |
118 | *id = htons(llproto_names[i].id); | 116 | *id = htons(llproto_names[i].id); |
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c index 60a78c715..50c9f208f 100644 --- a/networking/libiproute/ll_types.c +++ b/networking/libiproute/ll_types.c | |||
@@ -187,7 +187,7 @@ const char *ll_type_n2a(int type, char *buf, int len) | |||
187 | #endif /* FEATURE_IP_RARE_PROTOCOLS */ | 187 | #endif /* FEATURE_IP_RARE_PROTOCOLS */ |
188 | }; | 188 | }; |
189 | 189 | ||
190 | int i; | 190 | unsigned i; |
191 | const char *aname = arphrd_name; | 191 | const char *aname = arphrd_name; |
192 | for (i = 0; i < ARRAY_SIZE(arphrd_type); i++) { | 192 | for (i = 0; i < ARRAY_SIZE(arphrd_type); i++) { |
193 | if (arphrd_type[i] == type) | 193 | if (arphrd_type[i] == type) |
diff --git a/networking/sendmail.c b/networking/sendmail.c index f37d97f73..027656dd8 100644 --- a/networking/sendmail.c +++ b/networking/sendmail.c | |||
@@ -187,7 +187,7 @@ static int smtp_checkp(const char *fmt, const char *param, int code) | |||
187 | bb_error_msg_and_die("%s failed", msg); | 187 | bb_error_msg_and_die("%s failed", msg); |
188 | } | 188 | } |
189 | 189 | ||
190 | static int inline smtp_check(const char *fmt, int code) | 190 | static inline int smtp_check(const char *fmt, int code) |
191 | { | 191 | { |
192 | return smtp_checkp(fmt, NULL, code); | 192 | return smtp_checkp(fmt, NULL, code); |
193 | } | 193 | } |
@@ -224,7 +224,7 @@ static void pop3_checkr(const char *fmt, const char *param, char **ret) | |||
224 | bb_error_msg_and_die("%s failed", msg); | 224 | bb_error_msg_and_die("%s failed", msg); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void inline pop3_check(const char *fmt, const char *param) | 227 | static inline void pop3_check(const char *fmt, const char *param) |
228 | { | 228 | { |
229 | pop3_checkr(fmt, param, NULL); | 229 | pop3_checkr(fmt, param, NULL); |
230 | } | 230 | } |
diff --git a/networking/traceroute.c b/networking/traceroute.c index c0b4a3fd2..e9df27559 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -413,7 +413,7 @@ ifaddrlist(struct IFADDRLIST **ipaddrp) | |||
413 | ifc.ifc_buf = (caddr_t)ibuf; | 413 | ifc.ifc_buf = (caddr_t)ibuf; |
414 | 414 | ||
415 | if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 | 415 | if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 |
416 | || ifc.ifc_len < sizeof(struct ifreq) | 416 | || ifc.ifc_len < (int)sizeof(struct ifreq) |
417 | ) { | 417 | ) { |
418 | if (errno == EINVAL) | 418 | if (errno == EINVAL) |
419 | bb_error_msg_and_die( | 419 | bb_error_msg_and_die( |
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index b13367df7..58498f9ef 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -319,7 +319,7 @@ void read_config(const char *file) | |||
319 | { | 319 | { |
320 | FILE *in; | 320 | FILE *in; |
321 | char buffer[READ_CONFIG_BUF_SIZE], *token, *line; | 321 | char buffer[READ_CONFIG_BUF_SIZE], *token, *line; |
322 | int i, lineno; | 322 | unsigned i, lineno; |
323 | 323 | ||
324 | for (i = 0; i < KWS_WITH_DEFAULTS; i++) | 324 | for (i = 0; i < KWS_WITH_DEFAULTS; i++) |
325 | keywords[i].handler(keywords[i].def, keywords[i].var); | 325 | keywords[i].handler(keywords[i].def, keywords[i].var); |
@@ -344,7 +344,7 @@ void read_config(const char *file) | |||
344 | for (i = 0; i < ARRAY_SIZE(keywords); i++) { | 344 | for (i = 0; i < ARRAY_SIZE(keywords); i++) { |
345 | if (!strcasecmp(token, keywords[i].keyword)) { | 345 | if (!strcasecmp(token, keywords[i].keyword)) { |
346 | if (!keywords[i].handler(line, keywords[i].var)) { | 346 | if (!keywords[i].handler(line, keywords[i].var)) { |
347 | bb_error_msg("can't parse line %d in %s at '%s'", | 347 | bb_error_msg("can't parse line %u in %s at '%s'", |
348 | lineno, file, line); | 348 | lineno, file, line); |
349 | /* reset back to the default value */ | 349 | /* reset back to the default value */ |
350 | keywords[i].handler(keywords[i].def, keywords[i].var); | 350 | keywords[i].handler(keywords[i].def, keywords[i].var); |
diff --git a/networking/zcip.c b/networking/zcip.c index 8db840cec..fccb1a466 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -162,7 +162,7 @@ static int run(char *argv[3], struct in_addr *ip) | |||
162 | /** | 162 | /** |
163 | * Return milliseconds of random delay, up to "secs" seconds. | 163 | * Return milliseconds of random delay, up to "secs" seconds. |
164 | */ | 164 | */ |
165 | static unsigned ALWAYS_INLINE random_delay_ms(unsigned secs) | 165 | static ALWAYS_INLINE unsigned random_delay_ms(unsigned secs) |
166 | { | 166 | { |
167 | return rand() % (secs * 1000); | 167 | return rand() % (secs * 1000); |
168 | } | 168 | } |