summaryrefslogtreecommitdiff
path: root/src/audit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-14 20:26:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-14 20:26:48 +0300
commitedf03b155ba419b00dde585b3d35969621a024df (patch)
treec397c917cd6898101cd840790f2e24523057e14d /src/audit.c
parent59d15ab2599777b24e65fad7a1fb052de4f5ef38 (diff)
downloadapk-tools-edf03b155ba419b00dde585b3d35969621a024df.tar.gz
apk-tools-edf03b155ba419b00dde585b3d35969621a024df.tar.bz2
apk-tools-edf03b155ba419b00dde585b3d35969621a024df.tar.xz
apk-tools-edf03b155ba419b00dde585b3d35969621a024df.zip
audit, index, search, upgrade: use foreach_array_item
Diffstat (limited to 'src/audit.c')
-rw-r--r--src/audit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/audit.c b/src/audit.c
index d28883f..3e08930 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -195,12 +195,11 @@ recurse_check:
atctx->pathlen--;
} else {
struct apk_db_file *dbf;
- struct apk_protected_path_array *ppaths = dir->protected_paths;
- int i, protected = dir->protected, symlinks_only = dir->symlinks_only;
+ struct apk_protected_path *ppath;
+ int protected = dir->protected, symlinks_only = dir->symlinks_only;
/* inherit file's protection mask */
- for (i = 0; i < ppaths->num; i++) {
- struct apk_protected_path *ppath = &ppaths->item[i];
+ foreach_array_item(ppath, dir->protected_paths) {
char *slash = strchr(ppath->relative_pattern, '/');
if (slash == NULL) {
if (fnmatch(ppath->relative_pattern, name, FNM_PATHNAME) != 0)