aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorJames Byrne <james.byrne@origamienergy.com>2019-07-02 11:35:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-07-02 11:35:03 +0200
commit6937487be73cd4563b876413277a295a5fe2f32c (patch)
treef16cc9999a7c827891e6ec8d99c699fc791008ee /networking/libiproute
parentcaecfdc20d450686cd1f7e9b5f650322f894b3c2 (diff)
downloadbusybox-w32-6937487be73cd4563b876413277a295a5fe2f32c.tar.gz
busybox-w32-6937487be73cd4563b876413277a295a5fe2f32c.tar.bz2
busybox-w32-6937487be73cd4563b876413277a295a5fe2f32c.zip
libbb: reduce the overhead of single parameter bb_error_msg() calls
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/ipaddress.c10
-rw-r--r--networking/libiproute/ipneigh.c8
-rw-r--r--networking/libiproute/iproute.c12
-rw-r--r--networking/libiproute/iptunnel.c10
-rw-r--r--networking/libiproute/libnetlink.c30
-rw-r--r--networking/libiproute/utils.c2
6 files changed, 36 insertions, 36 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 7b7e0154b..86cf3beea 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -119,7 +119,7 @@ static NOINLINE int print_linkinfo(const struct nlmsghdr *n)
119 //memset(tb, 0, sizeof(tb)); - parse_rtattr does this 119 //memset(tb, 0, sizeof(tb)); - parse_rtattr does this
120 parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len); 120 parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
121 if (tb[IFLA_IFNAME] == NULL) { 121 if (tb[IFLA_IFNAME] == NULL) {
122 bb_error_msg("nil ifname"); 122 bb_simple_error_msg("nil ifname");
123 return -1; 123 return -1;
124 } 124 }
125 if (G_filter.label 125 if (G_filter.label
@@ -205,7 +205,7 @@ static NOINLINE int print_linkinfo(const struct nlmsghdr *n)
205static int flush_update(void) 205static int flush_update(void)
206{ 206{
207 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) { 207 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) {
208 bb_perror_msg("can't send flush request"); 208 bb_simple_perror_msg("can't send flush request");
209 return -1; 209 return -1;
210 } 210 }
211 G_filter.flushp = 0; 211 G_filter.flushp = 0;
@@ -439,7 +439,7 @@ int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush)
439 bb_error_msg_and_die(bb_msg_requires_arg, "flush"); 439 bb_error_msg_and_die(bb_msg_requires_arg, "flush");
440 } 440 }
441 if (G_filter.family == AF_PACKET) { 441 if (G_filter.family == AF_PACKET) {
442 bb_error_msg_and_die("can't flush link addresses"); 442 bb_simple_error_msg_and_die("can't flush link addresses");
443 } 443 }
444 } 444 }
445 445
@@ -700,7 +700,7 @@ static int ipaddr_modify(int cmd, int flags, char **argv)
700 700
701 if (!d) { 701 if (!d) {
702 /* There was no "dev IFACE", but we need that */ 702 /* There was no "dev IFACE", but we need that */
703 bb_error_msg_and_die("need \"dev IFACE\""); 703 bb_simple_error_msg_and_die("need \"dev IFACE\"");
704 } 704 }
705 if (l && !is_prefixed_with(l, d)) { 705 if (l && !is_prefixed_with(l, d)) {
706 bb_error_msg_and_die("\"dev\" (%s) must match \"label\" (%s)", d, l); 706 bb_error_msg_and_die("\"dev\" (%s) must match \"label\" (%s)", d, l);
@@ -717,7 +717,7 @@ static int ipaddr_modify(int cmd, int flags, char **argv)
717 inet_prefix brd; 717 inet_prefix brd;
718 int i; 718 int i;
719 if (req.ifa.ifa_family != AF_INET) { 719 if (req.ifa.ifa_family != AF_INET) {
720 bb_error_msg_and_die("broadcast can be set only for IPv4 addresses"); 720 bb_simple_error_msg_and_die("broadcast can be set only for IPv4 addresses");
721 } 721 }
722 brd = peer; 722 brd = peer;
723 if (brd.bitlen <= 30) { 723 if (brd.bitlen <= 30) {
diff --git a/networking/libiproute/ipneigh.c b/networking/libiproute/ipneigh.c
index 984dd4bdd..b9b4f4b31 100644
--- a/networking/libiproute/ipneigh.c
+++ b/networking/libiproute/ipneigh.c
@@ -49,7 +49,7 @@ typedef struct filter_t filter_t;
49static int flush_update(void) 49static int flush_update(void)
50{ 50{
51 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) { 51 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) {
52 bb_perror_msg("can't send flush request"); 52 bb_simple_perror_msg("can't send flush request");
53 return -1; 53 return -1;
54 } 54 }
55 G_filter.flushp = 0; 55 G_filter.flushp = 0;
@@ -305,7 +305,7 @@ static int FAST_FUNC ipneigh_list_or_flush(char **argv, int flush)
305 xrtnl_wilddump_request(&rth, G_filter.family, RTM_GETNEIGH); 305 xrtnl_wilddump_request(&rth, G_filter.family, RTM_GETNEIGH);
306 G_filter.flushed = 0; 306 G_filter.flushed = 0;
307 if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) { 307 if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) {
308 bb_perror_msg_and_die("flush terminated"); 308 bb_simple_perror_msg_and_die("flush terminated");
309 } 309 }
310 if (G_filter.flushed == 0) { 310 if (G_filter.flushed == 0) {
311 if (round == 0) 311 if (round == 0)
@@ -325,11 +325,11 @@ static int FAST_FUNC ipneigh_list_or_flush(char **argv, int flush)
325 ndm.ndm_family = G_filter.family; 325 ndm.ndm_family = G_filter.family;
326 326
327 if (rtnl_dump_request(&rth, RTM_GETNEIGH, &ndm, sizeof(struct ndmsg)) < 0) { 327 if (rtnl_dump_request(&rth, RTM_GETNEIGH, &ndm, sizeof(struct ndmsg)) < 0) {
328 bb_perror_msg_and_die("can't send dump request"); 328 bb_simple_perror_msg_and_die("can't send dump request");
329 } 329 }
330 330
331 if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) { 331 if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) {
332 bb_error_msg_and_die("dump terminated"); 332 bb_simple_error_msg_and_die("dump terminated");
333 } 333 }
334 334
335 return 0; 335 return 0;
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index b11078ed5..5a972f8b2 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -57,7 +57,7 @@ typedef struct filter_t filter_t;
57static int flush_update(void) 57static int flush_update(void)
58{ 58{
59 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) { 59 if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) {
60 bb_perror_msg("can't send flush request"); 60 bb_simple_perror_msg("can't send flush request");
61 return -1; 61 return -1;
62 } 62 }
63 G_filter.flushp = 0; 63 G_filter.flushp = 0;
@@ -756,7 +756,7 @@ static void iproute_flush_cache(void)
756 } 756 }
757 757
758 if (write(flush_fd, "-1", 2) < 2) { 758 if (write(flush_fd, "-1", 2) < 2) {
759 bb_perror_msg("can't flush routing cache"); 759 bb_simple_perror_msg("can't flush routing cache");
760 return; 760 return;
761 } 761 }
762 close(flush_fd); 762 close(flush_fd);
@@ -948,7 +948,7 @@ static int iproute_list_or_flush(char **argv, int flush)
948 if (G_filter.tb != -1) { 948 if (G_filter.tb != -1) {
949 xrtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE); 949 xrtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE);
950 } else if (rtnl_rtcache_request(&rth, do_ipv6) < 0) { 950 } else if (rtnl_rtcache_request(&rth, do_ipv6) < 0) {
951 bb_perror_msg_and_die("can't send dump request"); 951 bb_simple_perror_msg_and_die("can't send dump request");
952 } 952 }
953 xrtnl_dump_filter(&rth, print_route, NULL); 953 xrtnl_dump_filter(&rth, print_route, NULL);
954 954
@@ -1041,7 +1041,7 @@ static int iproute_get(char **argv)
1041 } 1041 }
1042 1042
1043 if (req.r.rtm_dst_len == 0) { 1043 if (req.r.rtm_dst_len == 0) {
1044 bb_error_msg_and_die("need at least destination address"); 1044 bb_simple_error_msg_and_die("need at least destination address");
1045 } 1045 }
1046 1046
1047 xrtnl_open(&rth); 1047 xrtnl_open(&rth);
@@ -1077,7 +1077,7 @@ static int iproute_get(char **argv)
1077 print_route(NULL, &req.n, NULL); 1077 print_route(NULL, &req.n, NULL);
1078 1078
1079 if (req.n.nlmsg_type != RTM_NEWROUTE) { 1079 if (req.n.nlmsg_type != RTM_NEWROUTE) {
1080 bb_error_msg_and_die("not a route?"); 1080 bb_simple_error_msg_and_die("not a route?");
1081 } 1081 }
1082 len -= NLMSG_LENGTH(sizeof(*r)); 1082 len -= NLMSG_LENGTH(sizeof(*r));
1083 if (len < 0) { 1083 if (len < 0) {
@@ -1091,7 +1091,7 @@ static int iproute_get(char **argv)
1091 tb[RTA_PREFSRC]->rta_type = RTA_SRC; 1091 tb[RTA_PREFSRC]->rta_type = RTA_SRC;
1092 r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]); 1092 r->rtm_src_len = 8*RTA_PAYLOAD(tb[RTA_PREFSRC]);
1093 } else if (!tb[RTA_SRC]) { 1093 } else if (!tb[RTA_SRC]) {
1094 bb_error_msg_and_die("can't connect the route"); 1094 bb_simple_error_msg_and_die("can't connect the route");
1095 } 1095 }
1096 if (!odev && tb[RTA_OIF]) { 1096 if (!odev && tb[RTA_OIF]) {
1097 tb[RTA_OIF]->rta_type = 0; 1097 tb[RTA_OIF]->rta_type = 0;
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index 4002feb78..c9fa632f3 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -338,7 +338,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
338 338
339 if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) { 339 if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) {
340 if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) { 340 if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) {
341 bb_error_msg_and_die("keys are not allowed with ipip and sit"); 341 bb_simple_error_msg_and_die("keys are not allowed with ipip and sit");
342 } 342 }
343 } 343 }
344 344
@@ -355,7 +355,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
355 p->o_flags |= GRE_KEY; 355 p->o_flags |= GRE_KEY;
356 } 356 }
357 if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) { 357 if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) {
358 bb_error_msg_and_die("broadcast tunnel requires a source address"); 358 bb_simple_error_msg_and_die("broadcast tunnel requires a source address");
359 } 359 }
360} 360}
361 361
@@ -367,7 +367,7 @@ static int do_add(int cmd, char **argv)
367 parse_args(argv, cmd, &p); 367 parse_args(argv, cmd, &p);
368 368
369 if (p.iph.ttl && p.iph.frag_off == 0) { 369 if (p.iph.ttl && p.iph.frag_off == 0) {
370 bb_error_msg_and_die("ttl != 0 and noptmudisc are incompatible"); 370 bb_simple_error_msg_and_die("ttl != 0 and noptmudisc are incompatible");
371 } 371 }
372 372
373 switch (p.iph.protocol) { 373 switch (p.iph.protocol) {
@@ -378,7 +378,7 @@ static int do_add(int cmd, char **argv)
378 case IPPROTO_IPV6: 378 case IPPROTO_IPV6:
379 return do_add_ioctl(cmd, "sit0", &p); 379 return do_add_ioctl(cmd, "sit0", &p);
380 default: 380 default:
381 bb_error_msg_and_die("can't determine tunnel mode (ipip, gre or sit)"); 381 bb_simple_error_msg_and_die("can't determine tunnel mode (ipip, gre or sit)");
382 } 382 }
383} 383}
384 384
@@ -485,7 +485,7 @@ static void do_tunnels_list(struct ip_tunnel_parm *p)
485 if (ptr == NULL || 485 if (ptr == NULL ||
486 (*ptr++ = 0, sscanf(buf, "%s", name) != 1) 486 (*ptr++ = 0, sscanf(buf, "%s", name) != 1)
487 ) { 487 ) {
488 bb_error_msg("wrong format of /proc/net/dev"); 488 bb_simple_error_msg("wrong format of /proc/net/dev");
489 return; 489 return;
490 } 490 }
491 if (sscanf(ptr, "%lu%lu%lu%lu%lu%lu%lu%*d%lu%lu%lu%lu%lu%lu%lu", 491 if (sscanf(ptr, "%lu%lu%lu%lu%lu%lu%lu%*d%lu%lu%lu%lu%lu%lu%lu",
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
index b0d4166ac..7e3473a1c 100644
--- a/networking/libiproute/libnetlink.c
+++ b/networking/libiproute/libnetlink.c
@@ -79,7 +79,7 @@ int FAST_FUNC rtnl_send_check(struct rtnl_handle *rth, const void *buf, int len)
79 if (h->nlmsg_type == NLMSG_ERROR) { 79 if (h->nlmsg_type == NLMSG_ERROR) {
80 struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); 80 struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h);
81 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) 81 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr)))
82 bb_error_msg("ERROR truncated"); 82 bb_simple_error_msg("ERROR truncated");
83 else 83 else
84 errno = -err->error; 84 errno = -err->error;
85 return -1; 85 return -1;
@@ -149,11 +149,11 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
149 if (status < 0) { 149 if (status < 0) {
150 if (errno == EINTR) 150 if (errno == EINTR)
151 continue; 151 continue;
152 bb_perror_msg("OVERRUN"); 152 bb_simple_perror_msg("OVERRUN");
153 continue; 153 continue;
154 } 154 }
155 if (status == 0) { 155 if (status == 0) {
156 bb_error_msg("EOF on netlink"); 156 bb_simple_error_msg("EOF on netlink");
157 goto ret; 157 goto ret;
158 } 158 }
159 if (msg.msg_namelen != sizeof(nladdr)) { 159 if (msg.msg_namelen != sizeof(nladdr)) {
@@ -184,10 +184,10 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
184 if (h->nlmsg_type == NLMSG_ERROR) { 184 if (h->nlmsg_type == NLMSG_ERROR) {
185 struct nlmsgerr *l_err = (struct nlmsgerr*)NLMSG_DATA(h); 185 struct nlmsgerr *l_err = (struct nlmsgerr*)NLMSG_DATA(h);
186 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) { 186 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
187 bb_error_msg("ERROR truncated"); 187 bb_simple_error_msg("ERROR truncated");
188 } else { 188 } else {
189 errno = -l_err->error; 189 errno = -l_err->error;
190 bb_perror_msg("RTNETLINK answers"); 190 bb_simple_perror_msg("RTNETLINK answers");
191 } 191 }
192 goto ret; 192 goto ret;
193 } 193 }
@@ -201,7 +201,7 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
201 h = NLMSG_NEXT(h, status); 201 h = NLMSG_NEXT(h, status);
202 } 202 }
203 if (msg.msg_flags & MSG_TRUNC) { 203 if (msg.msg_flags & MSG_TRUNC) {
204 bb_error_msg("message truncated"); 204 bb_simple_error_msg("message truncated");
205 continue; 205 continue;
206 } 206 }
207 if (status) { 207 if (status) {
@@ -221,7 +221,7 @@ int FAST_FUNC xrtnl_dump_filter(struct rtnl_handle *rth,
221{ 221{
222 int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/); 222 int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/);
223 if (ret < 0) 223 if (ret < 0)
224 bb_error_msg_and_die("dump terminated"); 224 bb_simple_error_msg_and_die("dump terminated");
225 return ret; 225 return ret;
226} 226}
227 227
@@ -266,7 +266,7 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
266 status = sendmsg(rtnl->fd, &msg, 0); 266 status = sendmsg(rtnl->fd, &msg, 0);
267 267
268 if (status < 0) { 268 if (status < 0) {
269 bb_perror_msg("can't talk to rtnetlink"); 269 bb_simple_perror_msg("can't talk to rtnetlink");
270 goto ret; 270 goto ret;
271 } 271 }
272 272
@@ -280,11 +280,11 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
280 if (errno == EINTR) { 280 if (errno == EINTR) {
281 continue; 281 continue;
282 } 282 }
283 bb_perror_msg("OVERRUN"); 283 bb_simple_perror_msg("OVERRUN");
284 continue; 284 continue;
285 } 285 }
286 if (status == 0) { 286 if (status == 0) {
287 bb_error_msg("EOF on netlink"); 287 bb_simple_error_msg("EOF on netlink");
288 goto ret; 288 goto ret;
289 } 289 }
290 if (msg.msg_namelen != sizeof(nladdr)) { 290 if (msg.msg_namelen != sizeof(nladdr)) {
@@ -297,7 +297,7 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
297 297
298 if (l < 0 || len > status) { 298 if (l < 0 || len > status) {
299 if (msg.msg_flags & MSG_TRUNC) { 299 if (msg.msg_flags & MSG_TRUNC) {
300 bb_error_msg("truncated message"); 300 bb_simple_error_msg("truncated message");
301 goto ret; 301 goto ret;
302 } 302 }
303 bb_error_msg_and_die("malformed message: len=%d!", len); 303 bb_error_msg_and_die("malformed message: len=%d!", len);
@@ -320,7 +320,7 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
320 if (h->nlmsg_type == NLMSG_ERROR) { 320 if (h->nlmsg_type == NLMSG_ERROR) {
321 struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); 321 struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h);
322 if (l < (int)sizeof(struct nlmsgerr)) { 322 if (l < (int)sizeof(struct nlmsgerr)) {
323 bb_error_msg("ERROR truncated"); 323 bb_simple_error_msg("ERROR truncated");
324 } else { 324 } else {
325 errno = - err->error; 325 errno = - err->error;
326 if (errno == 0) { 326 if (errno == 0) {
@@ -329,7 +329,7 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
329 } 329 }
330 goto ret_0; 330 goto ret_0;
331 } 331 }
332 bb_perror_msg("RTNETLINK answers"); 332 bb_simple_perror_msg("RTNETLINK answers");
333 } 333 }
334 goto ret; 334 goto ret;
335 } 335 }
@@ -338,13 +338,13 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
338 goto ret_0; 338 goto ret_0;
339 } 339 }
340 340
341 bb_error_msg("unexpected reply!"); 341 bb_simple_error_msg("unexpected reply!");
342 342
343 status -= NLMSG_ALIGN(len); 343 status -= NLMSG_ALIGN(len);
344 h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len)); 344 h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
345 } 345 }
346 if (msg.msg_flags & MSG_TRUNC) { 346 if (msg.msg_flags & MSG_TRUNC) {
347 bb_error_msg("message truncated"); 347 bb_simple_error_msg("message truncated");
348 continue; 348 continue;
349 } 349 }
350 if (status) { 350 if (status) {
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c
index bf053a54b..4ce230356 100644
--- a/networking/libiproute/utils.c
+++ b/networking/libiproute/utils.c
@@ -230,7 +230,7 @@ uint32_t FAST_FUNC get_addr32(char *name)
230char** FAST_FUNC next_arg(char **argv) 230char** FAST_FUNC next_arg(char **argv)
231{ 231{
232 if (!*++argv) 232 if (!*++argv)
233 bb_error_msg_and_die("command line is not complete, try \"help\""); 233 bb_simple_error_msg_and_die("command line is not complete, try \"help\"");
234 return argv; 234 return argv;
235} 235}
236 236