Skip to content

Commit

Permalink
update and clean up bfwreaddirplus2db
Browse files Browse the repository at this point in the history
get rid of globals
remove commented out code
remove unnecessary variables
  • Loading branch information
calccrypto committed Nov 9, 2023
1 parent 60b46a8 commit f5b717c
Show file tree
Hide file tree
Showing 10 changed files with 534 additions and 604 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
run: ctest || true

- name: Delete files not reported for coverage
run: find -name "*.gc*" -a \( -name "gendir.*" -o -name "make_testindex.*" -o -name "bffuse.*" -o -name "bfresultfuse.*" -o -name "bfwreaddirplus2db.*" -o -name "dfw.*" -o -name "parallel_rmr.*" -o -name "tsmepoch2time.*" -o -name "tsmtime2epoch.*" -o -path "*/test/*" \) -delete
run: find -name "*.gc*" -a \( -name "gendir.*" -o -name "make_testindex.*" -o -name "bffuse.*" -o -name "bfresultfuse.*" -o -name "dfw.*" -o -name "parallel_rmr.*" -o -name "tsmepoch2time.*" -o -name "tsmtime2epoch.*" -o -path "*/test/*" \) -delete

- name: Generate Python Coverage Report
run: |
Expand Down
1 change: 0 additions & 1 deletion include/bf.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ struct input {
AndOr_t andor;
int insertdir; // added for bfwreaddirplus2db
int insertfl; // added for bfwreaddirplus2db
int buildinindir; // added to notice when writing index dbs into the input dir
int suspectd; // added for bfwreaddirplus2db for how to default suspect directories 0 - not supsect 1 - suspect
int suspectfl; // added for bfwreaddirplus2db for how to default suspect file/link 0 - not suspect 1 - suspect
refstr_t insuspect; // added for bfwreaddirplus2db input path for suspects file
Expand Down
1 change: 0 additions & 1 deletion include/dbutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ int insertdbgo_xattrs(struct input *in, struct stat *dir, struct entry_data *dat
sll_t *xattr_db_list, struct template_db *xattr_template,
const char *topath, const size_t topath_len,
sqlite3_stmt *xattrs_res, sqlite3_stmt *xattr_files_res);
int insertdbgor(struct work *pwork, struct entry_data *data, sqlite3_stmt *res);

int insertsumdb(sqlite3 *sdb, const char *path, struct work *pwork, struct entry_data *data, struct sum *su);

Expand Down
1 change: 1 addition & 0 deletions include/template_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ int init_template_db(struct template_db *tdb);
int create_template(struct template_db *tdb, int (*create_tables)(const char *, sqlite3 *, void *),
const char *name);
int create_xattrs_template(struct template_db *tdb);
int create_dbdb_tables(const char *name, sqlite3 *db, void *args);
int create_dbdb_template(struct template_db *tdb);
int close_template_db(struct template_db *tdb);

Expand Down
2 changes: 1 addition & 1 deletion src/bf.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ int parse_cmd_line(int argc,
break;

case 'A':
INSTALL_INT(&in->suspectmethod, optarg, 1, 4, "-A", &retval);
INSTALL_INT(&in->suspectmethod, optarg, 0, 3, "-A", &retval);
break;

case 'g':
Expand Down
Loading

0 comments on commit f5b717c

Please sign in to comment.