summaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
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 bf983b5..439ba20 100644
--- a/archival/libunarchive/filter_accept_reject_list.c
+++ b/archival/libunarchive/filter_accept_reject_list.c
@@ -13,11 +13,14 @@
*/
char filter_accept_reject_list(archive_handle_t *archive_handle)
{
- const char *key = archive_handle->file_header->name;
- const llist_t *reject_entry = find_list_entry2(archive_handle->reject, key);
+ const char *key;
+ const llist_t *reject_entry;
const llist_t *accept_entry;
+ key = archive_handle->file_header->name;
+
/* If the key is in a reject list fail */
+ reject_entry = find_list_entry2(archive_handle->reject, key);
if (reject_entry) {
return EXIT_FAILURE;
}
diff --git a/archival/libunarchive/find_list_entry.c b/archival/libunarchive/find_list_entry.c
index f274103..7540589 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)
if (*c++ == '/') pattern_slash_cnt++;
c = filename;
d = buf;
- /* paranoia is better that buffer overflows */
+ /* paranoia is better than buffer overflows */
while (*c && d != buf + sizeof(buf)-1) {
if (*c == '/' && --pattern_slash_cnt < 0)
break;