summaryrefslogtreecommitdiff
path: root/networking/interface.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-04-21 02:21:45 +0000
committerDenis Vlasenko2008-04-21 02:21:45 +0000
commit01eaee9309c09ca5d7dc6ef3b2e96084affdab30 (patch)
tree4679b85ef024d357f3e3ada864555a63172a050d /networking/interface.c
parent0a1446275d88946734417ed96a3c0f1d7ea969e4 (diff)
downloadbusybox-01eaee9309c09ca5d7dc6ef3b2e96084affdab30.zip
busybox-01eaee9309c09ca5d7dc6ef3b2e96084affdab30.tar.gz
*: s/IF_NAMESIZE/IFNAMSIZ/, regularize its use a bit.
function old new delta strncpy_IFNAMSIZ - 13 +13 set_slave_mtu 39 37 -2 set_slave_hwaddr 52 50 -2 set_master_hwaddr 52 50 -2 set_if_flags 40 38 -2 get_if_settings 101 98 -3 ifenslave_main 1680 1661 -19 vconfig_main 306 280 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/7 up/down: 13/-56) Total: -43 bytes
Diffstat (limited to 'networking/interface.c')
-rw-r--r--networking/interface.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/networking/interface.c b/networking/interface.c
index 44bd8d3..f5c94f1 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -321,23 +321,23 @@ struct user_net_device_stats {
struct interface {
struct interface *next, *prev;
- char name[IFNAMSIZ]; /* interface name */
- short type; /* if type */
- short flags; /* various flags */
- int metric; /* routing metric */
- int mtu; /* MTU value */
- int tx_queue_len; /* transmit queue length */
- struct ifmap map; /* hardware setup */
- struct sockaddr addr; /* IP address */
- struct sockaddr dstaddr; /* P-P IP address */
- struct sockaddr broadaddr; /* IP broadcast address */
- struct sockaddr netmask; /* IP network mask */
+ char name[IFNAMSIZ]; /* interface name */
+ short type; /* if type */
+ short flags; /* various flags */
+ int metric; /* routing metric */
+ int mtu; /* MTU value */
+ int tx_queue_len; /* transmit queue length */
+ struct ifmap map; /* hardware setup */
+ struct sockaddr addr; /* IP address */
+ struct sockaddr dstaddr; /* P-P IP address */
+ struct sockaddr broadaddr; /* IP broadcast address */
+ struct sockaddr netmask; /* IP network mask */
int has_ip;
- char hwaddr[32]; /* HW address */
+ char hwaddr[32]; /* HW address */
int statistics_valid;
- struct user_net_device_stats stats; /* statistics */
- int keepalive; /* keepalive value for SLIP */
- int outfill; /* outfill value for SLIP */
+ struct user_net_device_stats stats; /* statistics */
+ int keepalive; /* keepalive value for SLIP */
+ int outfill; /* outfill value for SLIP */
};
@@ -388,7 +388,7 @@ static struct interface *add_interface(char *name)
}
new = xzalloc(sizeof(*new));
- safe_strncpy(new->name, name, IFNAMSIZ);
+ strncpy(new->name, name, IFNAMSIZ);
nextp = ife ? &ife->next : &int_list;
new->prev = ife;
new->next = *nextp;