networking/interface.c: get rid of global data
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 5 Mar 2018 17:28:04 +0000 (18:28 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 5 Mar 2018 17:30:33 +0000 (18:30 +0100)
commitd51ba0b5ab13aa09ab0482bd2dc63f39e8b40fad
tree96a325fe39b26b2af47eced6c33e85cdc4cfa6d3
parent82ec89480d524a219ad027d1f7c5aa42cc6373d5
networking/interface.c: get rid of global data

These were data/bss:

static.proc_read                                       1       -      -1
int_list                                               4       -      -4
int_last                                               4       -      -4

We never call display_interfaces() twice, thus code to not scan /proc twice
never triggers.

function                                             old     new   delta
do_if_print                                            -    1998   +1998
display_interfaces                                   145     249    +104
static.proc_read                                       1       -      -1
add_interface                                        104     103      -1
int_list                                               4       -      -4
int_last                                               4       -      -4
if_readlist_proc                                     560     542     -18
if_readconf                                          141       -    -141
do_if_fetch                                          643       -    -643
ife_print                                           1296       -   -1296
------------------------------------------------------------------------------
(add/remove: 1/6 grow/shrink: 1/2 up/down: 2102/-2108)         Total: -6 bytes
   text    data     bss     dec     hex filename
 933084     473    6844  940401   e5971 busybox_old
 933087     473    6836  940396   e596c busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/interface.c