diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-21 02:21:45 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-21 02:21:45 +0000 |
commit | 01eaee9309c09ca5d7dc6ef3b2e96084affdab30 (patch) | |
tree | 4679b85ef024d357f3e3ada864555a63172a050d /networking/interface.c | |
parent | 0a1446275d88946734417ed96a3c0f1d7ea969e4 (diff) | |
download | busybox-w32-01eaee9309c09ca5d7dc6ef3b2e96084affdab30.tar.gz busybox-w32-01eaee9309c09ca5d7dc6ef3b2e96084affdab30.tar.bz2 busybox-w32-01eaee9309c09ca5d7dc6ef3b2e96084affdab30.zip |
*: 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.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/networking/interface.c b/networking/interface.c index 44bd8d3d9..f5c94f1ac 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -321,23 +321,23 @@ struct user_net_device_stats { | |||
321 | 321 | ||
322 | struct interface { | 322 | struct interface { |
323 | struct interface *next, *prev; | 323 | struct interface *next, *prev; |
324 | char name[IFNAMSIZ]; /* interface name */ | 324 | char name[IFNAMSIZ]; /* interface name */ |
325 | short type; /* if type */ | 325 | short type; /* if type */ |
326 | short flags; /* various flags */ | 326 | short flags; /* various flags */ |
327 | int metric; /* routing metric */ | 327 | int metric; /* routing metric */ |
328 | int mtu; /* MTU value */ | 328 | int mtu; /* MTU value */ |
329 | int tx_queue_len; /* transmit queue length */ | 329 | int tx_queue_len; /* transmit queue length */ |
330 | struct ifmap map; /* hardware setup */ | 330 | struct ifmap map; /* hardware setup */ |
331 | struct sockaddr addr; /* IP address */ | 331 | struct sockaddr addr; /* IP address */ |
332 | struct sockaddr dstaddr; /* P-P IP address */ | 332 | struct sockaddr dstaddr; /* P-P IP address */ |
333 | struct sockaddr broadaddr; /* IP broadcast address */ | 333 | struct sockaddr broadaddr; /* IP broadcast address */ |
334 | struct sockaddr netmask; /* IP network mask */ | 334 | struct sockaddr netmask; /* IP network mask */ |
335 | int has_ip; | 335 | int has_ip; |
336 | char hwaddr[32]; /* HW address */ | 336 | char hwaddr[32]; /* HW address */ |
337 | int statistics_valid; | 337 | int statistics_valid; |
338 | struct user_net_device_stats stats; /* statistics */ | 338 | struct user_net_device_stats stats; /* statistics */ |
339 | int keepalive; /* keepalive value for SLIP */ | 339 | int keepalive; /* keepalive value for SLIP */ |
340 | int outfill; /* outfill value for SLIP */ | 340 | int outfill; /* outfill value for SLIP */ |
341 | }; | 341 | }; |
342 | 342 | ||
343 | 343 | ||
@@ -388,7 +388,7 @@ static struct interface *add_interface(char *name) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | new = xzalloc(sizeof(*new)); | 390 | new = xzalloc(sizeof(*new)); |
391 | safe_strncpy(new->name, name, IFNAMSIZ); | 391 | strncpy(new->name, name, IFNAMSIZ); |
392 | nextp = ife ? &ife->next : &int_list; | 392 | nextp = ife ? &ife->next : &int_list; |
393 | new->prev = ife; | 393 | new->prev = ife; |
394 | new->next = *nextp; | 394 | new->next = *nextp; |