diff options
author | Denis Vlasenko | 2008-12-02 18:18:50 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-12-02 18:18:50 +0000 |
commit | 360d9661b6a33b0358104623058f1c3629a469ea (patch) | |
tree | 268954b686b38c96428e3b74fc1ebb2ebdfdfb32 /networking/brctl.c | |
parent | 928b2c0fee65cae10f683ee0f1ea8d0a29a54924 (diff) | |
download | busybox-360d9661b6a33b0358104623058f1c3629a469ea.zip busybox-360d9661b6a33b0358104623058f1c3629a469ea.tar.gz |
libbb: add strncpy_IFNAMSIZ
function old new delta
...
udhcp_read_interface 225 220 -5
brctl_main 1151 1146 -5
add_interface 109 104 -5
ipaddr_list_or_flush 2174 2167 -7
do_add_ioctl 88 80 -8
vconfig_main 249 240 -9
do_del_ioctl 78 68 -10
do_iplink 1186 1173 -13
do_if_fetch 766 753 -13
buffer_fill_and_print 196 179 -17
parse_args 1709 1684 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140) Total: -129 bytes
Diffstat (limited to 'networking/brctl.c')
-rw-r--r-- | networking/brctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/brctl.c b/networking/brctl.c index 8475179..69e3c86 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -137,7 +137,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv) if (!if_indextoname(bridx[i], brname)) bb_perror_msg_and_die("can't get bridge name for index %d", i); - strncpy(ifr.ifr_name, brname, IFNAMSIZ); + strncpy_IFNAMSIZ(ifr.ifr_name, brname); arm_ioctl(args, BRCTL_GET_BRIDGE_INFO, (unsigned long) &bi, 0); @@ -191,7 +191,7 @@ int brctl_main(int argc UNUSED_PARAM, char **argv) if (!*argv) /* all but 'addif/delif' need at least two arguments */ bb_show_usage(); - strncpy(ifr.ifr_name, br, IFNAMSIZ); + strncpy_IFNAMSIZ(ifr.ifr_name, br); if (key == ARG_addif || key == ARG_delif) { /* addif or delif */ brif = *argv; ifr.ifr_ifindex = if_nametoindex(brif); |