Use at function to avoid memory manipulation during repository creation It also reduces the number of open/close operations during this process
modified libpkg/pkg_repo_create.c
@@ -202,12 +202,10 @@ pkg_create_repo_read_fts(struct pkg_fts_item **items, FTS *fts,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
@@ -222,31 +220,11 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -254,10 +232,6 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -265,7 +239,7 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -332,7 +306,7 @@ pkg_create_repo_worker(struct pkg_fts_item *start, size_t nelts,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -374,9 +348,6 @@ cleanup:
|
|
|
|
|
|
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -507,18 +478,18 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -538,6 +509,10 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -570,23 +545,20 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
| - | |
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
| - | |
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -632,7 +604,7 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -732,6 +704,12 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|