Skip to content

Commit

Permalink
Merge pull request libarchive#791 from hartzell/bug/disk-variable-masked
Browse files Browse the repository at this point in the history
Fix scoping error with "disk" variable
  • Loading branch information
kientzle authored Oct 3, 2016
2 parents d93dafd + e2c01a1 commit 2482dcf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/minitar/minitar.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ static void
create(const char *filename, int compress, const char **argv)
{
struct archive *a;
struct archive *disk;
struct archive_entry *entry;
ssize_t len;
int fd;
Expand Down Expand Up @@ -253,12 +252,11 @@ create(const char *filename, int compress, const char **argv)
filename = NULL;
archive_write_open_filename(a, filename);

disk = archive_read_disk_new();
#ifndef NO_LOOKUP
archive_read_disk_set_standard_lookup(disk);
#endif
while (*argv != NULL) {
struct archive *disk = archive_read_disk_new();
#ifndef NO_LOOKUP
archive_read_disk_set_standard_lookup(disk);
#endif
int r;

r = archive_read_disk_open(disk, *argv);
Expand Down

0 comments on commit 2482dcf

Please sign in to comment.