Skip to content

Commit

Permalink
libpkg: remove some unused function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rolinh committed Feb 13, 2015
1 parent 1bec4a8 commit b8ab113
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions libpkg/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ps_cb(void *ps, int ncols, char **coltext, __unused char **colnames)
}

static int
copy_database(sqlite3 *src, sqlite3 *dst, const char *name)
copy_database(sqlite3 *src, sqlite3 *dst)
{
sqlite3_backup *b;
char *errmsg;
Expand Down Expand Up @@ -147,7 +147,7 @@ pkgdb_dump(struct pkgdb *db, const char *dest)
}

pkg_emit_backup();
ret = copy_database(db->sqlite, backup, dest);
ret = copy_database(db->sqlite, backup);

sqlite3_close(backup);

Expand All @@ -174,7 +174,7 @@ pkgdb_load(struct pkgdb *db, const char *src)
}

pkg_emit_restore();
ret = copy_database(restore, db->sqlite, src);
ret = copy_database(restore, db->sqlite);

sqlite3_close(restore);

Expand Down
4 changes: 2 additions & 2 deletions libpkg/pkg_add.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pkg_add_file_random_suffix(char *buf, int buflen, int suflen)
}

static void
attempt_to_merge(bool renamed, const struct pkg_file *rf, struct pkg_config_file *rcf,
attempt_to_merge(bool renamed, struct pkg_config_file *rcf,
struct pkg *local, char *pathname, const char *path, struct sbuf *newconf)
{
const struct pkg_file *lf = NULL;
Expand Down Expand Up @@ -222,7 +222,7 @@ do_extract(struct archive *a, struct archive_entry *ae, const char *location,
* check if the file is already provided by previous package
*/
if (!automerge)
attempt_to_merge(renamed, rf, rcf, local, pathname, path, newconf);
attempt_to_merge(renamed, rcf, local, pathname, path, newconf);

if (sbuf_len(newconf) == 0 && (rcf == NULL || rcf->content == NULL)) {
pkg_debug(1, "Extracting: %s", archive_entry_pathname(ae));
Expand Down
6 changes: 3 additions & 3 deletions libpkg/pkg_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ pkg_jobs_add_req(struct pkg_jobs *j, struct pkg *pkg)
* reverse - try to upgrade reverse deps as well
*/
static void
pkg_jobs_process_add_request(struct pkg_jobs *j, bool top)
pkg_jobs_process_add_request(struct pkg_jobs *j)
{
bool force = j->flags & PKG_FLAG_FORCE,
reverse = j->flags & PKG_FLAG_RECURSIVE,
Expand Down Expand Up @@ -496,7 +496,7 @@ pkg_jobs_process_add_request(struct pkg_jobs *j, bool top)
pkg_jobs_add_req_from_universe(&j->request_add, *pun, false, true);
}
/* Now recursively process all items checked */
pkg_jobs_process_add_request(j, false);
pkg_jobs_process_add_request(j);
}
utarray_free(to_process);
}
Expand Down Expand Up @@ -1506,7 +1506,7 @@ jobs_solve_install_upgrade(struct pkg_jobs *j)
}
}

pkg_jobs_process_add_request(j, true);
pkg_jobs_process_add_request(j);
if (pkg_conflicts_request_resolve(j) != EPKG_OK) {
pkg_emit_error("Cannot resolve conflicts in a request");
return (EPKG_FATAL);
Expand Down
6 changes: 3 additions & 3 deletions libpkg/repo/binary/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ pkg_repo_binary_register_conflicts(const char *origin, char **conflicts,

static int
pkg_repo_binary_add_from_manifest(char *buf, sqlite3 *sqlite, size_t len,
struct pkg_manifest_key **keys, struct pkg **p __unused, bool is_legacy,
struct pkg_manifest_key **keys, struct pkg **p __unused,
struct pkg_repo *repo)
{
int rc = EPKG_OK;
Expand Down Expand Up @@ -441,7 +441,7 @@ pkg_repo_binary_update_proceed(const char *name, struct pkg_repo *repo,
struct pkg_manifest_key *keys = NULL;
unsigned char *map = MAP_FAILED;
size_t len = 0;
bool in_trans = false, legacy_repo = false;
bool in_trans = false;

pkg_debug(1, "Pkgrepo, begin update of '%s'", name);

Expand Down Expand Up @@ -500,7 +500,7 @@ pkg_repo_binary_update_proceed(const char *name, struct pkg_repo *repo,
if ((cnt % 10 ) == 0)
pkg_emit_progress_tick(next - map, len);
rc = pkg_repo_binary_add_from_manifest(walk, sqlite, next - walk,
&keys, &pkg, legacy_repo, repo);
&keys, &pkg, repo);
if (rc != EPKG_OK) {
pkg_emit_progress_tick(len, len);
break;
Expand Down

0 comments on commit b8ab113

Please sign in to comment.