diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2015-08-13 15:57:21 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-08-17 17:00:10 +0200 |
commit | d077565bb27966c47ea6f0e9de092133954b5807 (patch) | |
tree | 16b326157ab4bec8ccc46890a1031bbe73afd0c0 | |
parent | fb52769f4a18920e597359962addf60858f158b5 (diff) | |
download | busybox-w32-d077565bb27966c47ea6f0e9de092133954b5807.tar.gz busybox-w32-d077565bb27966c47ea6f0e9de092133954b5807.tar.bz2 busybox-w32-d077565bb27966c47ea6f0e9de092133954b5807.zip |
unit-tests: remove unnecesary field from struct bbunit_listelem
In the initial submission struct bbunit_listelem was manipulated by
custom list functions implemented in bbunit.c. Since the tests are now
added to the list by llist_add_to_end(), which allocates the llist_t
objects behind the scenes, there's no need for the *next field.
function old new delta
unit_main 142 141 -1
bbunit_strrstr_elem 24 16 -8
bbunit_obscure_weak_pass_elem 24 16 -8
bbunit_obscure_strong_pass_elem 24 16 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-25) Total: -25 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/libbb.h | 1 | ||||
-rw-r--r-- | libbb/bbunit.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index 54d01b75a..136d4fd87 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1983,7 +1983,6 @@ static ALWAYS_INLINE unsigned char bb_ascii_tolower(unsigned char a) | |||
1983 | typedef void (*bbunit_testfunc)(void); | 1983 | typedef void (*bbunit_testfunc)(void); |
1984 | 1984 | ||
1985 | struct bbunit_listelem { | 1985 | struct bbunit_listelem { |
1986 | struct bbunit_listelem* next; | ||
1987 | const char* name; | 1986 | const char* name; |
1988 | bbunit_testfunc testfunc; | 1987 | bbunit_testfunc testfunc; |
1989 | }; | 1988 | }; |
diff --git a/libbb/bbunit.c b/libbb/bbunit.c index 4c692d59f..66a7df945 100644 --- a/libbb/bbunit.c +++ b/libbb/bbunit.c | |||
@@ -71,7 +71,6 @@ int unit_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
71 | tests_failed++; | 71 | tests_failed++; |
72 | } | 72 | } |
73 | tests_run++; | 73 | tests_run++; |
74 | el = el->next; | ||
75 | } | 74 | } |
76 | 75 | ||
77 | #if WANT_TIMING | 76 | #if WANT_TIMING |