diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-28 10:29:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-28 10:29:17 +0000 |
commit | b9256054419582dc35917b1cb39c7e09f489dfad (patch) | |
tree | 2ce3a816b788b3af5fa54109b765ee22d5550c5e /ipsvd | |
parent | c3122bca53255799f052fcc0e911b68237faa12d (diff) | |
download | busybox-w32-b9256054419582dc35917b1cb39c7e09f489dfad.tar.gz busybox-w32-b9256054419582dc35917b1cb39c7e09f489dfad.tar.bz2 busybox-w32-b9256054419582dc35917b1cb39c7e09f489dfad.zip |
assorted static vars removal
function old new delta
tcpudpsvd_main 1829 1839 +10
update_status 567 569 +2
sigterm 1 - -1
.........
dhcprelay_signal_handler 8 - -8
nfs_strerror 60 49 -11
singlemount 4579 4564 -15
static.p 16 - -16
svstatus 20 - -20
dhcprelay_xid_list 32 - -32
runsv_main 1785 1746 -39
static.buf 74 28 -46
svd 56 - -56
dhcprelay_main 1141 1080 -61
------------------------------------------------------------------------------
(add/remove: 0/20 grow/shrink: 2/10 up/down: 12/-386) Total: -374 bytes
Diffstat (limited to 'ipsvd')
-rw-r--r-- | ipsvd/tcpudp.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/ipsvd/tcpudp.c b/ipsvd/tcpudp.c index 6a11539c7..537a5240f 100644 --- a/ipsvd/tcpudp.c +++ b/ipsvd/tcpudp.c | |||
@@ -40,11 +40,24 @@ | |||
40 | #include "ssl_io.h" | 40 | #include "ssl_io.h" |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | static unsigned verbose; | 43 | struct globals { |
44 | static unsigned max_per_host; | 44 | unsigned verbose; |
45 | static unsigned cur_per_host; | 45 | unsigned max_per_host; |
46 | static unsigned cnum; | 46 | unsigned cur_per_host; |
47 | static unsigned cmax = 30; | 47 | unsigned cnum; |
48 | unsigned cmax; | ||
49 | }; | ||
50 | #define G (*(struct globals*)&bb_common_bufsiz1) | ||
51 | #define verbose (G.verbose ) | ||
52 | #define max_per_host (G.max_per_host) | ||
53 | #define cur_per_host (G.cur_per_host) | ||
54 | #define cnum (G.cnum ) | ||
55 | #define cmax (G.cmax ) | ||
56 | #define INIT_G() \ | ||
57 | do { \ | ||
58 | cmax = 30; \ | ||
59 | } while (0) | ||
60 | |||
48 | 61 | ||
49 | static void xsetenv_proto(const char *proto, const char *n, const char *v) | 62 | static void xsetenv_proto(const char *proto, const char *n, const char *v) |
50 | { | 63 | { |
@@ -147,6 +160,8 @@ int tcpudpsvd_main(int argc, char **argv) | |||
147 | int conn; | 160 | int conn; |
148 | unsigned backlog = 20; | 161 | unsigned backlog = 20; |
149 | 162 | ||
163 | INIT_G(); | ||
164 | |||
150 | tcp = (applet_name[0] == 't'); | 165 | tcp = (applet_name[0] == 't'); |
151 | 166 | ||
152 | /* 3+ args, -i at most once, -p implies -h, -v is counter */ | 167 | /* 3+ args, -i at most once, -p implies -h, -v is counter */ |