aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:32:26 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:32:26 +0000
commit9f153f610fe82528bcd0f976fd9ce2122c516b2d (patch)
treed16b02a2b0b6514034d9642b47f91b662c46e765 /archival/libunarchive
parent3f165fa5b3b38fa4b321be94a97f06927f636fb1 (diff)
downloadbusybox-w32-9f153f610fe82528bcd0f976fd9ce2122c516b2d.tar.gz
busybox-w32-9f153f610fe82528bcd0f976fd9ce2122c516b2d.tar.bz2
busybox-w32-9f153f610fe82528bcd0f976fd9ce2122c516b2d.zip
fsck_minix: getopt32-ification; code shrink; reduce stack usage;
fix bug in map_block2: s/(blknr >= 256 * 256)/(blknr < 256 * 256)/ function old new delta get_inode_common - 291 +291 add_zone_common - 205 +205 ask 229 215 -14 write_super_block 109 90 -19 write_block 653 629 -24 bad_zone 95 64 -31 read_block 241 198 -43 fsck_minix_main 3285 3195 -90 add_zone2 217 34 -183 add_zone 216 33 -183 recursive_check 1097 866 -231 recursive_check2 1340 956 -384 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/10 up/down: 496/-1202) Total: -706 bytes text data bss dec hex filename 799349 661 7428 807438 c520e busybox_old 798437 661 7428 806526 c4e7e busybox_unstripped
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/filter_accept_reject_list.c7
-rw-r--r--archival/libunarchive/find_list_entry.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c
index bf983b5e8..439ba20ca 100644
--- a/archival/libunarchive/filter_accept_reject_list.c
+++ b/archival/libunarchive/filter_accept_reject_list.c
@@ -13,11 +13,14 @@
13 */ 13 */
14char filter_accept_reject_list(archive_handle_t *archive_handle) 14char filter_accept_reject_list(archive_handle_t *archive_handle)
15{ 15{
16 const char *key = archive_handle->file_header->name; 16 const char *key;
17 const llist_t *reject_entry = find_list_entry2(archive_handle->reject, key); 17 const llist_t *reject_entry;
18 const llist_t *accept_entry; 18 const llist_t *accept_entry;
19 19
20 key = archive_handle->file_header->name;
21
20 /* If the key is in a reject list fail */ 22 /* If the key is in a reject list fail */
23 reject_entry = find_list_entry2(archive_handle->reject, key);
21 if (reject_entry) { 24 if (reject_entry) {
22 return EXIT_FAILURE; 25 return EXIT_FAILURE;
23 } 26 }
diff --git a/archival/libunarchive/find_list_entry.c b/archival/libunarchive/find_list_entry.c
index f2741039d..754058953 100644
--- a/archival/libunarchive/find_list_entry.c
+++ b/archival/libunarchive/find_list_entry.c
@@ -38,7 +38,7 @@ const llist_t *find_list_entry2(const llist_t *list, const char *filename)
38 if (*c++ == '/') pattern_slash_cnt++; 38 if (*c++ == '/') pattern_slash_cnt++;
39 c = filename; 39 c = filename;
40 d = buf; 40 d = buf;
41 /* paranoia is better that buffer overflows */ 41 /* paranoia is better than buffer overflows */
42 while (*c && d != buf + sizeof(buf)-1) { 42 while (*c && d != buf + sizeof(buf)-1) {
43 if (*c == '/' && --pattern_slash_cnt < 0) 43 if (*c == '/' && --pattern_slash_cnt < 0)
44 break; 44 break;