diff options
Diffstat (limited to 'lib/libarchive/test/test_acl_basic.c')
-rw-r--r-- | lib/libarchive/test/test_acl_basic.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libarchive/test/test_acl_basic.c b/lib/libarchive/test/test_acl_basic.c index 192c12b..e7fb8a9 100644 --- a/lib/libarchive/test/test_acl_basic.c +++ b/lib/libarchive/test/test_acl_basic.c @@ -34,14 +34,12 @@ __FBSDID("$FreeBSD$"); * filesystems support ACLs or not. */ -static unsigned char buff[16384]; - struct acl_t { int type; /* Type of ACL: "access" or "default" */ int permset; /* Permissions for this class of users. */ int tag; /* Owner, User, Owning group, group, other, etc. */ int qual; /* GID or UID of user/group, depending on tag. */ - char *name; /* Name of user/group, depending on tag. */ + const char *name; /* Name of user/group, depending on tag. */ }; struct acl_t acls0[] = { @@ -79,7 +77,7 @@ struct acl_t acls2[] = { ARCHIVE_ENTRY_ACL_OTHER, -1, "" }, }; -void +static void set_acls(struct archive_entry *ae, struct acl_t *acls, int n) { int i; @@ -92,7 +90,7 @@ set_acls(struct archive_entry *ae, struct acl_t *acls, int n) } } -int +static int acl_match(struct acl_t *acl, int type, int permset, int tag, int qual, const char *name) { if (type != acl->type) @@ -120,11 +118,11 @@ acl_match(struct acl_t *acl, int type, int permset, int tag, int qual, const cha return (0 == strcmp(name, acl->name)); } -void +static void compare_acls(struct archive_entry *ae, struct acl_t *acls, int n, int mode) { int *marker = malloc(sizeof(marker[0]) * n); - int marker_i, i; + int i; int r; int type, permset, tag, qual; int matched; @@ -179,8 +177,6 @@ compare_acls(struct archive_entry *ae, struct acl_t *acls, int n, int mode) DEFINE_TEST(test_acl_basic) { - int i; - struct archive *a; struct archive_entry *ae; /* Create a simple archive_entry. */ |