summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-20 02:15:16 +0200
committerDan McGee <dan@archlinux.org>2011-09-20 17:23:11 +0200
commit0f92fc59638e5d053966c8f39afd615a870141cc (patch)
tree9f1e1be0d9447a445676bf4e4d1fb6666eca2f58 /src
parent79cbce60ac4a40bf11d039e9bdcd09c852ce3292 (diff)
downloadpacman-0f92fc59638e5d053966c8f39afd615a870141cc.tar.gz
pacman-0f92fc59638e5d053966c8f39afd615a870141cc.tar.xz
utils/cleanupdelta: remove unneeded syncdbpath
This variable was totally unused. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/util/cleanupdelta.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c
index a45efdcc..6553e6f6 100644
--- a/src/util/cleanupdelta.c
+++ b/src/util/cleanupdelta.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <limits.h> /* PATH_MAX */
#include <alpm.h>
#include <alpm_list.h>
@@ -67,20 +66,18 @@ static void checkpkgs(alpm_list_t *pkglist)
}
}
-static void checkdbs(const char *dbpath, alpm_list_t *dbnames) {
- char syncdbpath[PATH_MAX];
+static void checkdbs(alpm_list_t *dbnames) {
alpm_db_t *db = NULL;
alpm_list_t *i;
const alpm_siglevel_t level = ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
for(i = dbnames; i; i = alpm_list_next(i)) {
- char *dbname = alpm_list_getdata(i);
- snprintf(syncdbpath, PATH_MAX, "%s/sync/%s", dbpath, dbname);
+ const char *dbname = alpm_list_getdata(i);
db = alpm_db_register_sync(handle, dbname, level);
if(db == NULL) {
- fprintf(stderr, "error: could not register sync database (%s)\n",
- alpm_strerror(alpm_errno(handle)));
- return;
+ fprintf(stderr, "error: could not register sync database '%s' (%s)\n",
+ dbname, alpm_strerror(alpm_errno(handle)));
+ continue;
}
checkpkgs(alpm_db_get_pkgcache(db));
}
@@ -130,7 +127,7 @@ int main(int argc, char *argv[])
/* let us get log messages from libalpm */
alpm_option_set_logcb(handle, output_cb);
- checkdbs(dbpath,dbnames);
+ checkdbs(dbnames);
alpm_list_free(dbnames);
cleanup(0);