summaryrefslogtreecommitdiff
path: root/archival/libarchive
diff options
context:
space:
mode:
authorDenys Vlasenko2012-06-22 15:54:05 +0200
committerDenys Vlasenko2012-06-22 15:54:05 +0200
commitd52c9510fd3a9407044166360fe8b752fd841efc (patch)
tree7a8df296fc191db0af774c15af1aa94063bac5b5 /archival/libarchive
parent6ebb2b6b242fc4e66100f6ea64101eb75d2071e9 (diff)
downloadbusybox-d52c9510fd3a9407044166360fe8b752fd841efc.zip
busybox-d52c9510fd3a9407044166360fe8b752fd841efc.tar.gz
trivial small speed optimization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r--archival/libarchive/filter_accept_reject_list.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/archival/libarchive/filter_accept_reject_list.c b/archival/libarchive/filter_accept_reject_list.c
index 39c8113..2483749 100644
--- a/archival/libarchive/filter_accept_reject_list.c
+++ b/archival/libarchive/filter_accept_reject_list.c
@@ -24,11 +24,13 @@ char FAST_FUNC filter_accept_reject_list(archive_handle_t *archive_handle)
if (reject_entry) {
return EXIT_FAILURE;
}
- accept_entry = find_list_entry2(archive_handle->accept, key);
/* Fail if an accept list was specified and the key wasnt in there */
- if ((accept_entry == NULL) && archive_handle->accept) {
- return EXIT_FAILURE;
+ if (archive_handle->accept) {
+ accept_entry = find_list_entry2(archive_handle->accept, key);
+ if (!accept_entry) {
+ return EXIT_FAILURE;
+ }
}
/* Accepted */