#include "bsdtar.h"
#include "err.h"
-#include "archive_platform.h"
-#include "archive_entry.h"
struct progress_data {
struct bsdtar *bsdtar;
static void
progress_func(void *cookie)
{
- struct progress_data *progress_data = (struct progress_data*)cookie;
+ struct progress_data *progress_data = (struct progress_data *)cookie;
struct bsdtar *bsdtar = progress_data->bsdtar;
struct archive *a = progress_data->archive;
struct archive_entry *entry = progress_data->entry;
if (reader_options != NULL) {
char *p;
/* Set default read options. */
- p = (char*)malloc(sizeof(IGNORE_WRONG_MODULE_NAME)
+ p = (char *)malloc(sizeof(IGNORE_WRONG_MODULE_NAME)
+ strlen(reader_options) + 1);
if (p == NULL)
lafe_errc(1, errno, "Out of memory");
for (;;) {
/* Support --fast-read option */
+ const char *p;
if (bsdtar->option_fast_read &&
archive_match_path_unmatched_inclusions(bsdtar->matching) == 0)
break;
}
if (r == ARCHIVE_FATAL)
break;
- if (archive_entry_pathname(entry) == NULL || archive_entry_pathname(entry)[0] == '\0') {
+ p = archive_entry_pathname(entry);
+ if (p == NULL || p[0] == '\0') {
lafe_warnc(0, "Archive entry has empty or unreadable filename ... skipping.");
bsdtar->return_value = 1;
continue;